/**
  ******************************************************************************
  * @文件名称 : disp_menu.c
  * @摘要 : 
  * @创建日期 : Aug 1, 2024
  * @创建者：Mbl
  ******************************************************************************
  * @使用说明
  *
  *  
  ******************************************************************************
  */

/* 声明包含头文件 -----------------------------------------------------------*/
#include "../Inc/disp_factory.h"
#include "../Inc/data_public.h"
/* 声明私有类型定义---------------------------------------------------------*/
/* 选项卡 */
enum facDisplay{
	TEMP,
	REF,
	EEV,
	REFALARM,
	FLOW,
	PRESS,
	CHECK,
	PORT,
	ALARM,
	LIGHT,
	INFO
};

/* 声明私有宏定义 -----------------------------------------------------------*/
/* 工厂各界面输入框个数宏定义 */
#define UI_TEMP_SUMQTY (4)  //温度相关界面输入框总数
#define UI_REF_SUMQTY (2)  //氟路设置界面输入框总数
#define UI_EEV_SUMQTY (8)  //电子膨胀阀界面输入框总数
#define UI_REFALARM_SUMQTY (10)  //氟路报警界面输入框总数
#define UI_FLOW_SUMQTY (7)  //流量相关界面输入框总数
#define UI_PRESS_SUMQTY (4)  //压力相关界面输入框总数
#define UI_PORT_SUMQTY (4)  //端口配置界面输入框总数
#define UI_ALARM_SUMQTY (6)  //报警配置界面输入框总数
#define UI_LIGHT_SUMQTY (1)  //声光配置界面输入框总数
#define UI_INFO_SUMQTY (1)  //设备信息界面输入框总数

/* 声明私有变量 -------------------------------------------------------------*/
/* 工厂参数界面切换相关 */
enum facDisplay facDispNew;  //工厂参数中当前显示选项卡界面
static lv_obj_t* tempBtn;  //温度相关按钮
static lv_obj_t* templabel;  //温度相关按钮标签
static lv_obj_t* refBtn;  //氟路设置按钮
static lv_obj_t* reflabel;  //氟路设置按钮标签
static lv_obj_t* eevBtn;  //电子膨胀阀按钮
static lv_obj_t* eevlabel;  //电子膨胀阀按钮标签
static lv_obj_t* refAlarmBtn;  //氟路报警按钮
static lv_obj_t* refAlarmlabel;  //氟路报警按钮标签
static lv_obj_t* flowBtn;  //流量相关按钮
static lv_obj_t* flowlabel;  //流量相关按钮标签
static lv_obj_t* pressBtn;  //压力相关按钮
static lv_obj_t* presslabel;  //压力相关按钮标签
static lv_obj_t* checkBtn;  //检测配置按钮
static lv_obj_t* checklabel;  //检测配置按钮标签
static lv_obj_t* portBtn;  //端口配置按钮
static lv_obj_t* portlabel;  //端口配置按钮标签
static lv_obj_t* alarmBtn;  //报警配置按钮
static lv_obj_t* alarmlabel;  //报警配置按钮标签
static lv_obj_t* lightBtn;  //声光配置按钮
static lv_obj_t* lightlabel;  //声光配置按钮标签
static lv_obj_t* infoBtn;  //设备信息按钮
static lv_obj_t* infolabel;  //设备信息按钮标签

/* 温度相关界面 */
static lv_obj_t* secTempBtn;           //辅助温度使能按钮
static lv_obj_t* secTempLabel;  //辅助温度使能标签
static lv_obj_t* ambiTempBtn;          //环境温度使能按钮
static lv_obj_t* ambiTempLabel;  //环境温度使能标签
static lv_obj_t* preheatBtn;         //预加热使能按钮
static lv_obj_t* thermalBtn;           //热控温使能按钮
static ta_userData_t taFac_temp[UI_TEMP_SUMQTY];  //输入框

/* 氟路设置界面 */
static lv_obj_t* runStopBtn;           //启停使能按钮
static lv_obj_t* pidBtn;           //PID使能按钮
static lv_obj_t* eevCtrlBtn;           //EEV使能按钮
static lv_obj_t* oneCompBtn;           //单机使能按钮
static lv_obj_t* twoCompBtn;           //双机使能按钮
static ta_userData_t taFac_ref[UI_REF_SUMQTY];  //输入框

/* EEV界面 */
static lv_obj_t* ctrlModeBtn;   //EEV控制方式按钮
static lv_obj_t* ctrlModeLabel;   //EEV控制方式按钮标签
static lv_obj_t* refRunBtn;   //启动制冷阀按钮
static lv_obj_t* bypRunBtn;   //启动旁通阀按钮
static lv_obj_t* runBtn;   //设备启停按钮
static lv_obj_t* runLabel;  //设备启停按钮标签
static lv_obj_t* auxNoneBtn;   //辅助阀无按钮
static lv_obj_t* auxWithBtn;   //辅助阀有按钮
static lv_obj_t* pvRefLabel;  //制冷阀实际开度标签
static lv_obj_t* pvBypLabel;  //旁通阀实际开度标签
static lv_obj_t* highPressLabel;  //氟路高压值显示标签
static lv_obj_t* hpSatTempLabel;  //高压饱和温度显示标签
static lv_obj_t* condTempLabel;  //冷凝温度显示标签
static lv_obj_t* supercolcTempLabel;  //过冷度显示标签
static lv_obj_t* lowPressLabel;  //氟路低压值显示标签
static lv_obj_t* lpSatTempLabel;  //低压饱和温度显示标签
static lv_obj_t* evaTempLabel;  //蒸发温度显示标签
static lv_obj_t* superheatTempLabel;  //过热度显示标签
static lv_obj_t* outletTempLabel;  //压机出气温度显示标签
static lv_obj_t* pvAuxLabel;  //辅助阀实际开度标签
static ta_userData_t taFac_eev[UI_EEV_SUMQTY];  //输入框

/* 氟路报警界面 */
static lv_obj_t* evaLowAutoBtn;   //蒸发压力下限自动计算按钮
static lv_obj_t* evaLowAutoLabel;  //蒸发压力下限自动计算按钮标签
static lv_obj_t* highPressSwNoneBtn;   //氟路高压开关没有按钮
static lv_obj_t* highPressSwWithBtn;   //氟路高压开关有按钮
static lv_obj_t* highPressSeNoneBtn;   //氟路高压传感器没有按钮
static lv_obj_t* highPressSeWithBtn;   //氟路高压传感器有按钮
static lv_obj_t* condTempNoneBtn;   //冷凝温度传感器没有按钮
static lv_obj_t* condTempWithBtn;   //冷凝温度传感器有按钮
static lv_obj_t* outletTempNoneBtn;   //出气温度传感器没有按钮
static lv_obj_t* outletTempWithBtn;   //出气温度传感器有按钮
static lv_obj_t* evaTempNoneBtn;   //蒸发温度传感器没有按钮
static lv_obj_t* evaTempSwWithBtn;   //蒸发温度传感器有按钮
static ta_userData_t taFac_refalarm[UI_REFALARM_SUMQTY];  //输入框

/* 流量相关界面 */
static lv_obj_t* flowNoneBtn;   //流量传感器无按钮
static lv_obj_t* flowAnalogBtn;   //流量传感器模拟信号按钮
static lv_obj_t* flowPulseBtn;   //流量传感器脉冲信号按钮
static lv_obj_t* flowCtrlNoneBtn;   //流量控制无按钮
static lv_obj_t* flowCtrlAnalogBtn;   //流量控制模拟信号按钮
static lv_obj_t* flowCtrlCommBtn;   //流量控制通讯信号按钮
static ta_userData_t taFac_flow[UI_FLOW_SUMQTY];  //输入框
static lv_obj_t* pumpFreLabel;  //水泵频率实时显示标签

/* 压力相关界面 */
static lv_obj_t* outPressNoneBtn;   //出液压力传感器无按钮
static lv_obj_t* outPressWithBtn;   //出液压力传感器有按钮
static lv_obj_t* inPressNoneBtn;   //回液压力传感器无按钮
static lv_obj_t* inPressWithBtn;   	//回液压力传感器有按钮
static lv_obj_t* pressCtrlNoneBtn;   //压力控制无按钮
static lv_obj_t* pressCtrlAnalogBtn;   //压力控制模拟信号按钮
static lv_obj_t* pressCtrlCommBtn;   //压力控制通讯信号按钮
static ta_userData_t taFac_press[UI_PRESS_SUMQTY];  //输入框

/* 检测配置界面 */
static lv_obj_t* waterNoneBtn;   //水质检测失能按钮
static lv_obj_t* waterWithBtn;   //水质检测使能按钮
static lv_obj_t* coolingNoneBtn;   //冷却水检测失能按钮
static lv_obj_t* coolingWithBtn;   	//冷却水检测使能按钮
static lv_obj_t* heartNoneBtn;      //加热器检测失能按钮
static lv_obj_t* heartWithBtn;   	//加热器检测使能按钮
static lv_obj_t* sensorSignalDropdown; // 传感器信号类型下拉框
static lv_obj_t* factInput1dropdown;  //工厂输入1下拉框
static lv_obj_t* factInput2dropdown;  //工厂输入2下拉框
static lv_obj_t* factInput3dropdown;  //工厂输入3下拉框
static lv_obj_t* factInput4dropdown;  //工厂输入4下拉框
static lv_obj_t* lowFlowTypedropdown;  //低流量报警类型下拉框
static lv_obj_t* levelSelectdropdown;  //液位开关选择下拉框

/* 检测配置界面 */
static lv_obj_t* factOut1dropdown;  //工厂输出1下拉框
static lv_obj_t* factOut2dropdown;  //工厂输出2下拉框
static ta_userData_t taFac_port[UI_PORT_SUMQTY];  //输入框

/* 报警配置界面 */
static lv_obj_t* tempHighAlarmBtn;   //工厂保护温度上限报警按钮
static lv_obj_t* tempHighFaultBtn;   //工厂保护温度上限故障按钮
static lv_obj_t* tempLowAlarmBtn;   //工厂保护温度下限报警按钮
static lv_obj_t* tempLowFaultBtn;   //工厂保护温度下限故障按钮
static lv_obj_t* flowAlarmBtn;   //工厂低流量报警按钮
static lv_obj_t* flowFaultBtn;   //工厂低流量故障按钮
static lv_obj_t* levelAlarmBtn;   //工厂低液位报警按钮
static lv_obj_t* levelFaultBtn;   	//工厂低液位故障按钮
static lv_obj_t* clearMessageBtn;   //清除历史报警信息按钮
static ta_userData_t taFac_alarm[UI_ALARM_SUMQTY];  //输入框

/* 声光配置界面 */
static lv_obj_t* enLightBtn;   //声光使能按钮
static lv_obj_t* disenLightBtn;   //声光失能按钮
static lv_obj_t* enSoundBtn;   //扬声器使能按钮
static lv_obj_t* disenSoundBtn;   //扬声器失能按钮
static ta_userData_t taFac_light[UI_LIGHT_SUMQTY];  //输入框
static lv_obj_t* slider;		// 进度条

/* 设备信息界面 */
static lv_obj_t* disenInfoBtn;   //厂家信息显示失能按钮
static lv_obj_t* enInfoBtn;   //厂家信息显示使能按钮
static lv_obj_t* userSaveBtn;   //保存用户参数按钮
static lv_obj_t* facSaveBtn;   //保存工厂参数按钮
static lv_obj_t* facRestoreBtn;   //恢复工厂参数按钮
static lv_obj_t* clearRunTimeBtn;   //清除运行时间按钮
static lv_obj_t* refTypedropdown;  //冷媒种类下拉框
static lv_obj_t* commProtocoldropdown;  //通讯协议下拉框
static ta_userData_t taFac_info[UI_INFO_SUMQTY];  //输入框

/* 声明私有常量 -------------------------------------------------------------*/

/* 声明私有函数 -------------------------------------------------------------*/

/**
* @brief 工厂参数温度相关按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_temp_event_cb(lv_event_t* e)
{
    lv_event_code_t code = lv_event_get_code(e);
    lv_obj_t* target = lv_event_get_target(e);
    if (code == LV_EVENT_CLICKED)
    {
        if (target == secTempBtn)  //辅助温度使能
        {
            if (FP.ES_Temp2 == 0)
            {
                FP.ES_Temp2 = 1;
                lv_label_set_text(secTempLabel, dispText[DA.typeLanguage].on);
                lv_obj_add_state(secTempBtn, LV_STATE_CHECKED);
            }
            else
            {
                FP.ES_Temp2 = 0;
                lv_label_set_text(secTempLabel, dispText[DA.typeLanguage].off);
                lv_obj_clear_state(secTempBtn, LV_STATE_CHECKED);
            }
            send_aux(&FP.ES_Temp2);
        }
        else if (target == ambiTempBtn)  //环境温度使能
        {
            if (FP.ES_TempAmbi == 0)
            {
                FP.ES_TempAmbi = 1;
                lv_label_set_text(ambiTempLabel, dispText[DA.typeLanguage].on);
                lv_obj_add_state(ambiTempBtn, LV_STATE_CHECKED);
            }
            else
            {
                FP.ES_TempAmbi = 0;
                lv_label_set_text(ambiTempLabel, dispText[DA.typeLanguage].off);
                lv_obj_clear_state(ambiTempBtn, LV_STATE_CHECKED);
            }
            send_aux(&FP.ES_TempAmbi);
        }
        else if (target == preheatBtn)  //预加热使能
        {
            FP.Type_Heater = 1;
            lv_obj_add_state(preheatBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(thermalBtn, LV_STATE_CHECKED);
            send_aux(&FP.Type_Heater);
        }
        else if (target == thermalBtn)  //热控温使能
        {
            FP.Type_Heater = 0;
            lv_obj_add_state(thermalBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(preheatBtn, LV_STATE_CHECKED);
            send_aux(&FP.Type_Heater);
        }
    }
}

/**
  * @brief	温度相关界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facTemp_init(void)
{
	uint8_t i = 0;
	/* 关联变量 */
    taFac_temp[0].data.userData.value = &FP.LL_TempFF;
    taFac_temp[0].data.userData.store_enable = 1;
    taFac_temp[1].data.userData.value = &FP.HL_TempFF;
    taFac_temp[1].data.userData.store_enable = 1;
    taFac_temp[2].data.userData.value = &FP.LL_TempSV1;
    taFac_temp[2].data.userData.store_enable = 1;
    taFac_temp[3].data.userData.value = &FP.HL_TempSV1;
    taFac_temp[3].data.userData.store_enable = 1;

    /* 设置输入框属性 */
	for(i = 0; i < UI_TEMP_SUMQTY; i++)
	{
		taFac_temp[i].data.min = -99;
		taFac_temp[i].data.max = 999;
		taFac_temp[i].type = "%.1f";
		taFac_temp[i].width = lv_pct(25);
		taFac_temp[i].height = lv_pct(10);
		taFac_temp[i].pos_x = lv_pct(30 + (i%2) * 35);
		taFac_temp[i].pos_y = lv_pct((i/2) * 23 - 3);
		taFac_temp[i].max_length = 8;
		taFac_temp[i].accepted_chars = "0123456789-.";
		taFac_temp[i].one_line = true;
		taFac_temp[i].cursor_click_pos = false;
	}
}

/**
  * @brief  温度相关创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_temp(void)
{
    lv_obj_t* label = NULL;  //显示标签

    tab_facTemp_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_TEMP_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_temp[i]);
    }

    /* 工厂保护范围标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].factRnge);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
	/* 保护温度 -- */
	label = lv_label_create(cont);
	lv_label_set_text(label, "--");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT,  lv_pct(57), 0);  //位置
    /* 保护温度 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT,  lv_pct(92), 0);  //位置

    /* 控温范围标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ctrlRnge);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 控制温度 -- */
    label = lv_label_create(cont);
    lv_label_set_text(label, "--");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(57), lv_pct(23));
    /* 控制温度 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(92), lv_pct(23));

    /* 辅温度传感器使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].secondaryTemp);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 辅助温度使能按钮 */
    secTempBtn = lv_btn_create(cont);  //创建辅助温度使能按钮
    lv_obj_add_style(secTempBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(secTempBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(secTempBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(secTempBtn, UI_factory_temp_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 辅助温度使能标签 */
    secTempLabel = lv_label_create(secTempBtn);
    lv_label_set_text(secTempLabel, dispText[DA.typeLanguage].off);
    lv_obj_set_style_text_color(secTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(secTempLabel, secTempBtn, LV_ALIGN_CENTER, 0, 0);  //位置

    /* 环境温度传感器使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ambientTemp);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 环境温度使能按钮 */
    ambiTempBtn = lv_btn_create(cont);  //创建辅助温度使能按钮
    lv_obj_add_style(ambiTempBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(ambiTempBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(ambiTempBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(ambiTempBtn, UI_factory_temp_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 环境温度使能标签 */
    ambiTempLabel = lv_label_create(cont);
    lv_label_set_text(ambiTempLabel, dispText[DA.typeLanguage].off);
    lv_obj_set_style_text_color(ambiTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(ambiTempLabel, ambiTempBtn, LV_ALIGN_CENTER, 0, 0);  //位置

    /* 加热模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].heating);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));
    /* 预加热使能按钮 */
    preheatBtn = lv_btn_create(cont);  //预加热使能按钮
    lv_obj_add_style(preheatBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(preheatBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(preheatBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(preheatBtn, UI_factory_temp_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 热控温使能按钮按钮 */
    thermalBtn = lv_btn_create(cont);  //热控温使能按钮按钮
    lv_obj_add_style(thermalBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(thermalBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(thermalBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(thermalBtn, UI_factory_temp_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 预加热使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].preheat);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, preheatBtn, LV_ALIGN_CENTER, 0, 0);
    /* 热控温使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].thermal);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, thermalBtn, LV_ALIGN_CENTER, 0, 0);

	/* 更新按钮状态 */
    if (FP.ES_Temp2 == 0)
    {
        lv_label_set_text(secTempLabel, dispText[DA.typeLanguage].off);
        lv_obj_clear_state(secTempBtn, LV_STATE_CHECKED);
    }
    else
    {
        lv_label_set_text(secTempLabel, dispText[DA.typeLanguage].on);
        lv_obj_add_state(secTempBtn, LV_STATE_CHECKED);
    }
    if (FP.ES_TempAmbi == 0)
    {
        lv_label_set_text(ambiTempLabel, dispText[DA.typeLanguage].off);
        lv_obj_clear_state(ambiTempBtn, LV_STATE_CHECKED);
    }
    else
    {
        lv_label_set_text(ambiTempLabel, dispText[DA.typeLanguage].on);
        lv_obj_add_state(ambiTempBtn, LV_STATE_CHECKED);
    }
    if (FP.Type_Heater == 0)
    {
        lv_obj_add_state(thermalBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(preheatBtn, LV_STATE_CHECKED);
    }
    else
    {
        lv_obj_add_state(preheatBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(thermalBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂参数氟路相关按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_ref_event_cb(lv_event_t* e)
{
	 lv_event_code_t code = lv_event_get_code(e);
	    lv_obj_t* target = lv_event_get_target(e);
	    if (code == LV_EVENT_CLICKED)
	    {
	        if (target == runStopBtn)  //启停使能按钮
	        {
	            FP.Tepy_Comp = 0;
	            lv_obj_add_state(runStopBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(pidBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(eevCtrlBtn, LV_STATE_CHECKED);
	            send_aux(&FP.Tepy_Comp);
	        }
	        else if (target == pidBtn)  //PID使能按钮
	        {
	            FP.Tepy_Comp = 1;
	            lv_obj_add_state(pidBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(runStopBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(eevCtrlBtn, LV_STATE_CHECKED);
	            send_aux(&FP.Tepy_Comp);
	        }
	        else if (target == eevCtrlBtn)  //EEV使能按钮
	        {
	            FP.Tepy_Comp = 2;
	            lv_obj_add_state(eevCtrlBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(runStopBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(pidBtn, LV_STATE_CHECKED);
	            send_aux(&FP.Tepy_Comp);
	        }
	        else if (target == oneCompBtn)  //单机使能按钮
	        {
	            FP.Type_CompNumber = 0;
	            lv_obj_add_state(oneCompBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(twoCompBtn, LV_STATE_CHECKED);
	            send_aux(&FP.Type_CompNumber);
	        }
	        else if (target == twoCompBtn)  //双机使能按钮
	        {
	            FP.Type_CompNumber = 1;
	            lv_obj_add_state(twoCompBtn, LV_STATE_CHECKED);
	            lv_obj_clear_state(oneCompBtn, LV_STATE_CHECKED);
	            send_aux(&FP.Type_CompNumber);
	        }
	    }
}

/**
  * @brief	氟路相关界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facRef_init(void)
{
	/* 关联变量 */
	taFac_ref[0].data.userData.value = &FP.Time_RunDelayComp;
	taFac_ref[0].data.userData.store_enable = 1;
	taFac_ref[1].data.userData.value = &FP.D_Value_CT;
	taFac_ref[1].data.userData.store_enable = 1;
    /* 设置输入框属性 */
	taFac_ref[0].data.min = 40;
	taFac_ref[0].data.max = 999;
	taFac_ref[0].type = "%d";
	taFac_ref[0].width = lv_pct(25);
	taFac_ref[0].height = lv_pct(10);
	taFac_ref[0].pos_x = lv_pct(65);
	taFac_ref[0].pos_y = lv_pct(20);
	taFac_ref[0].max_length = 8;
	taFac_ref[0].accepted_chars = "0123456789";
	taFac_ref[0].one_line = true;
	taFac_ref[0].cursor_click_pos = false;

	taFac_ref[1].data.min = 0.2;
	taFac_ref[1].data.max = 99;
	taFac_ref[1].type = "%.1f";
	taFac_ref[1].width = lv_pct(25);
	taFac_ref[1].height = lv_pct(10);
	taFac_ref[1].pos_x = lv_pct(65);
	taFac_ref[1].pos_y = lv_pct(43);
	taFac_ref[1].max_length = 8;
	taFac_ref[1].accepted_chars = "0123456789-.";
	taFac_ref[1].one_line = true;
	taFac_ref[1].cursor_click_pos = false;
}

/**
  * @brief  氟路相关创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_ref(void)
{
	lv_obj_t* label = NULL;  //显示标签

	tab_facRef_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_REF_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_ref[i]);
    }


	/* 压机控制模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ctrl);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* 启停使能按钮 */
    runStopBtn = lv_btn_create(cont);  //创建启停使能按钮
    lv_obj_add_style(runStopBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(runStopBtn, lv_pct(20),LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(runStopBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(runStopBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(25), 0);  //位置
    lv_obj_add_event_cb(runStopBtn, UI_factory_ref_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* PID使能按钮按钮 */
    pidBtn = lv_btn_create(cont);  //创建PID使能按钮按钮
    lv_obj_add_style(pidBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(pidBtn, lv_pct(20),LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(pidBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(pidBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(50), 0);  //位置
    lv_obj_add_event_cb(pidBtn, UI_factory_ref_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* EEV使能按钮 */
    eevCtrlBtn = lv_btn_create(cont);  //创建EEV使能按钮
    lv_obj_add_style(eevCtrlBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(eevCtrlBtn, lv_pct(20),LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(eevCtrlBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(eevCtrlBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(75), 0);  //位置
    lv_obj_add_event_cb(eevCtrlBtn, UI_factory_ref_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 启停使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].on_off);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, runStopBtn, LV_ALIGN_CENTER, 0, 0);
    /* PID使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "PID");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, pidBtn, LV_ALIGN_CENTER, 0, 0);
    /* EEV使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "EEV");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, eevCtrlBtn, LV_ALIGN_CENTER, 0, 0);

	/* 压机保护时长标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].protTime);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 压机保护时长 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "S");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(92), lv_pct(23));


	/* 压机启停回差标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].compHys);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));

    /* 压机启停回差 符号 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "±");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(60), lv_pct(46));

    /* 压机启停回差 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(92), lv_pct(46));

	/* 压机控制级数标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].compStages);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 单机使能按钮 */
    oneCompBtn = lv_btn_create(cont);  //创建单机使能按钮
    lv_obj_add_style(oneCompBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(oneCompBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(oneCompBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(oneCompBtn, UI_factory_ref_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 双机使能按钮按钮 */
    twoCompBtn = lv_btn_create(cont);  //创建双机使能按钮
    lv_obj_add_style(twoCompBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(twoCompBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(twoCompBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(twoCompBtn, UI_factory_ref_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 单机使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].single);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, oneCompBtn, LV_ALIGN_CENTER, 0, 0);
    /* 双机使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].Double);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, twoCompBtn, LV_ALIGN_CENTER, 0, 0);

	/* 更新按钮状态 */
    if (FP.Tepy_Comp == 0)  //启停使能按钮
    {
        lv_obj_add_state(runStopBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pidBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(eevCtrlBtn, LV_STATE_CHECKED);

    }
    else if (FP.Tepy_Comp == 1)  //PID使能按钮
    {
        lv_obj_add_state(pidBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(runStopBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(eevCtrlBtn, LV_STATE_CHECKED);
    }
    else if (FP.Tepy_Comp == 2)  //EEV使能按钮
    {
        lv_obj_add_state(eevCtrlBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(runStopBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pidBtn, LV_STATE_CHECKED);
    }
    if (FP.Type_CompNumber == 0)  //单机使能按钮
    {
        lv_obj_add_state(oneCompBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(twoCompBtn, LV_STATE_CHECKED);
    }
    else if (FP.Type_CompNumber == 1)  //双机使能按钮
    {
        lv_obj_add_state(twoCompBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(oneCompBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 电子膨胀阀按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_eev_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_CLICKED)
	{
	    if (target == ctrlModeBtn)  //EEV控制方式按钮
		{
            if (UP.gFlag_Auto == 1)
            {
            	UP.gFlag_Auto = 0;
                lv_label_set_text(ctrlModeLabel, "AUTO");
                lv_obj_add_state(ctrlModeBtn, LV_STATE_CHECKED);
            }
            else
            {
            	UP.gFlag_Auto = 1;
                lv_label_set_text(ctrlModeLabel, "JOG");
                lv_obj_clear_state(ctrlModeBtn, LV_STATE_CHECKED);
            }
            send_aux(&UP.gFlag_Auto);
		}
	    else if (target == refRunBtn)  //启动制冷阀按钮
		{
            if (UP.gEnableDataEEV1 == 0)
            {
            	UP.gEnableDataEEV1 = 1;
                lv_obj_clear_state(refRunBtn, LV_STATE_CHECKED);
            }
            send_aux(&UP.gEnableDataEEV1);
		}
	    else if (target == bypRunBtn)  //启动旁通阀按钮
		{
            if (UP.gEnableDataEEV2 == 0)
            {
            	UP.gEnableDataEEV2 = 1;
                lv_obj_clear_state(bypRunBtn, LV_STATE_CHECKED);
            }
            send_aux(&UP.gEnableDataEEV2);
		}
	    else if (target == runBtn)  //设备启停按钮
		{
	        if (UP.regAddr100.Para.Run_State == 0)
	        {
	        	UP.regAddr100.Para.Run_State = 1;
	        	lv_obj_add_state(runBtn, LV_STATE_CHECKED);
	            lv_label_set_text(runLabel, dispText[DA.typeLanguage].stop);
	        }
	        else
	        {
	        	UP.regAddr100.Para.Run_State = 0;
	        	lv_obj_clear_state(runBtn, LV_STATE_CHECKED);
	            lv_label_set_text(runLabel, dispText[DA.typeLanguage].run);
	        }
	        send_aux(&UP.regAddr100.rState_Chiller);
		}
	    else if (target == auxNoneBtn)  //辅助阀无按钮
		{
			FP.ES_EEV3 = 0;
			lv_obj_add_state(auxNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(auxWithBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_EEV3);
		}
	    else if (target == auxWithBtn)  //辅助阀有按钮
		{
			FP.ES_EEV3 = 1;
			lv_obj_add_state(auxWithBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(auxNoneBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_EEV3);
		}
	}
}

/**
  * @brief	电子膨胀阀界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facEEV_init(void)
{
	uint8_t i = 0;

	/* 关联变量 */
	taFac_eev[0].data.userData.value = &UP.gUpDownData2EEV1;
	taFac_eev[0].data.userData.store_enable = 1;
	taFac_eev[1].data.userData.value = &UP.gUpDownData2EEV2;
	taFac_eev[1].data.userData.store_enable = 1;
	taFac_eev[2].data.userData.value = &FP.SV_Alarm_Press1_2;
	taFac_eev[2].data.userData.store_enable = 1;
	taFac_eev[3].data.userData.value = &UP.SV_Temp1;
	taFac_eev[3].data.userData.store_enable = 1;
	taFac_eev[4].data.userData.value = &FP.Tdown2;
	taFac_eev[4].data.userData.store_enable = 1;
	taFac_eev[5].data.userData.value = &FP.Tdown1;
	taFac_eev[5].data.userData.store_enable = 1;
	taFac_eev[6].data.userData.value = &FP.Tup1;
	taFac_eev[6].data.userData.store_enable = 1;
	taFac_eev[7].data.userData.value = &FP.Tup2;
	taFac_eev[7].data.userData.store_enable = 1;

    /* 设置输入框属性 */
	for(i = 0; i < 2; i++)  //设置开度
	{
		taFac_eev[i].data.min = 0;
		taFac_eev[i].data.max = 100;
		taFac_eev[i].type = "%.1f";
		taFac_eev[i].width = lv_pct(20);
		taFac_eev[i].height = lv_pct(10);
		taFac_eev[i].pos_x = lv_pct(45);
		taFac_eev[i].pos_y = lv_pct(23 * (i + 1) - 3);
		taFac_eev[i].max_length = 8;
		taFac_eev[i].accepted_chars = "0123456789-.";
		taFac_eev[i].one_line = true;
		taFac_eev[i].cursor_click_pos = false;
	}

	//蒸发压力上限值
	i = 2;
	taFac_eev[i].data.min = FP.LL_TempSV1;
	taFac_eev[i].data.max = FP.HL_TempSV1;
	taFac_eev[i].type = "%.1f";
	taFac_eev[i].width = lv_pct(25);
	taFac_eev[i].height = lv_pct(10);
	taFac_eev[i].pos_x = lv_pct(40);
	taFac_eev[i].pos_y = lv_pct(23 * (i + 6) - 3);
	taFac_eev[i].max_length = 8;
	taFac_eev[i].accepted_chars = "0123456789-.";
	taFac_eev[i].one_line = true;
	taFac_eev[i].cursor_click_pos = false;
	//目标温度
	i = 3;
	taFac_eev[i].data.min = FP.LL_TempSV1;
	taFac_eev[i].data.max = FP.HL_TempSV1;
	taFac_eev[i].type = "%.1f";
	taFac_eev[i].width = lv_pct(25);
	taFac_eev[i].height = lv_pct(10);
	taFac_eev[i].pos_x = lv_pct(40);
	taFac_eev[i].pos_y = lv_pct(23 * (i + 6) - 3);
	taFac_eev[i].max_length = 8;
	taFac_eev[i].accepted_chars = "0123456789-.";
	taFac_eev[i].one_line = true;
	taFac_eev[i].cursor_click_pos = false;

	//辅助阀温度
	for(i = 4; i < UI_EEV_SUMQTY; i++)
	{
		taFac_eev[i].data.min = 0;
		taFac_eev[i].data.max = 100;
		taFac_eev[i].type = "%.1f";
		taFac_eev[i].width = lv_pct(25);
		taFac_eev[i].height = lv_pct(10);
		taFac_eev[i].pos_x = lv_pct(40);
		taFac_eev[i].pos_y = lv_pct(23 * (i + 8) - 3);
		taFac_eev[i].max_length = 8;
		taFac_eev[i].accepted_chars = "0123456789-.";
		taFac_eev[i].one_line = true;
		taFac_eev[i].cursor_click_pos = false;
	}
}

/**
  * @brief  电子膨胀阀创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_eev(void)
{
	lv_obj_t* label = NULL;  //显示标签

    tab_facEEV_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_EEV_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_eev[i]);
    }

    /* EEV控制方式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ctrlMode);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* EEV控制方式按钮 */
    ctrlModeBtn = lv_btn_create(cont);  //创建EEV控制方式按钮
    lv_obj_add_style(ctrlModeBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(ctrlModeBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(ctrlModeBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_state(ctrlModeBtn, LV_STATE_CHECKED);
    lv_obj_add_event_cb(ctrlModeBtn, UI_factory_eev_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* EEV控制方式按钮标签 */
    ctrlModeLabel = lv_label_create(cont);
    lv_obj_set_style_text_color(ctrlModeLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(ctrlModeLabel, ctrlModeBtn, LV_ALIGN_CENTER, 0, 0);  //位置

    /* 制冷阀标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ref);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 启动制冷阀按钮 */
    refRunBtn = lv_btn_create(cont);  //创建启动制冷阀按钮
    lv_obj_add_style(refRunBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(refRunBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(refRunBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_state(refRunBtn, LV_STATE_CHECKED);
    lv_obj_add_event_cb(refRunBtn, UI_factory_eev_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 启动制冷阀按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].send);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, refRunBtn, LV_ALIGN_CENTER, 0, 0);
    /* 制冷阀实际开度标签 */
    pvRefLabel = lv_label_create(cont);  //创建制冷阀实际开度标签
    lv_obj_set_style_text_color(pvRefLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(pvRefLabel, LV_ALIGN_TOP_LEFT, lv_pct(25), lv_pct(23));
    /* 制冷阀实际开度标签 -- */
    label = lv_label_create(cont);
    lv_label_set_text(label, "/");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(38), lv_pct(23));
    /* 制冷阀实际开度标签 % */
    label = lv_label_create(cont);
    lv_label_set_text(label, "%");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(23));


    /* 旁通阀标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].byp);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 启动旁通阀按钮 */
    bypRunBtn = lv_btn_create(cont);  //创建启动旁通阀按钮
    lv_obj_add_style(bypRunBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(bypRunBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(bypRunBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_state(bypRunBtn, LV_STATE_CHECKED);
    lv_obj_add_event_cb(bypRunBtn, UI_factory_eev_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 启动制冷阀按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].send);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, bypRunBtn, LV_ALIGN_CENTER, 0, 0);
    /* 旁通阀实际开度标签 */
    pvBypLabel = lv_label_create(cont);  //创建旁通阀实际开度标签
    lv_obj_set_style_text_color(pvBypLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(pvBypLabel, LV_ALIGN_TOP_LEFT, lv_pct(25), lv_pct(46));
    /* 旁通阀实际开度标签 / */
    label = lv_label_create(cont);
    lv_label_set_text(label, "/");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(38), lv_pct(46));
    /* 旁通阀实际开度标签 % */
    label = lv_label_create(cont);
    lv_label_set_text(label, "%");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(46));


    /* 氟路高压标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].highp);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 氟路高压值显示标签 */
    highPressLabel = lv_label_create(cont);  //创建旁通阀实际开度标签
    lv_obj_set_style_text_color(highPressLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(highPressLabel, label, LV_ALIGN_OUT_RIGHT_MID, 20,0);  //位置
    /* 氟路高压值单位标签 */
    label = lv_label_create(cont);  //创建氟路高压值单位标签
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(45), lv_pct(69));  //位置
    /* 饱和温度标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].satt);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(58), lv_pct(69));
    /* 高压饱和温度显示标签 */
	hpSatTempLabel = lv_label_create(cont);  //创建旁通阀实际开度标签
	lv_obj_set_style_text_color(hpSatTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(hpSatTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 10,0);  //位置
    /* 高压饱和温度单位标签 */
    label = lv_label_create(cont);  //创建氟路高压值单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(94), lv_pct(69));  //位置

    /* 冷凝温度标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].condt);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));
    /* 冷凝温度显示标签 */
    condTempLabel = lv_label_create(cont);  //创建冷凝温度显示标签
    lv_obj_set_style_text_color(condTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(condTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 20,0);  //位置
    /* 冷凝温度单位标签 */
    label = lv_label_create(cont);  //创建氟路高压值单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(45), lv_pct(92));  //位置
    /* 过冷度标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].sct);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(58), lv_pct(92));
    /* 过冷度显示标签 */
	supercolcTempLabel = lv_label_create(cont);  //创建过冷度显示标签
	lv_obj_set_style_text_color(supercolcTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(supercolcTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 10,0);  //位置
    /* 过冷度显示单位标签 */
    label = lv_label_create(cont);  //创建氟路高压值单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(94), lv_pct(92));  //位置

    /* 氟路低压标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].lowp);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(115));
    /* 氟路低压值显示标签 */
    lowPressLabel = lv_label_create(cont);  //创建氟路低压值显示标签
    lv_obj_set_style_text_color(lowPressLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(lowPressLabel, label, LV_ALIGN_OUT_RIGHT_MID, 20,0);  //位置
    /* 氟路低压值显示单位标签 */
    label = lv_label_create(cont);  //创建氟路高压值单位标签
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(45), lv_pct(115));  //位置
    /* 饱和温度标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].satt);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(58), lv_pct(115));
    /* 低压饱和温度显示标签 */
	lpSatTempLabel = lv_label_create(cont);  //创建低压饱和温度显示标签
	lv_obj_set_style_text_color(lpSatTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(lpSatTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 10,0);  //位置
    /* 低压饱和温度单位标签 */
    label = lv_label_create(cont);  //创建氟路低压值单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(94), lv_pct(115));  //位置

    /* 蒸发温度标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].evat);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(138));
    /* 蒸发温度显示标签 */
    evaTempLabel = lv_label_create(cont);  //创建蒸发温度显示标签
    lv_obj_set_style_text_color(evaTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(evaTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 20,0);  //位置
    /* 蒸发温度单位标签 */
    label = lv_label_create(cont);  //创建蒸发温度单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(45), lv_pct(138));  //位置
    /* 过热度标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].sht);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(58), lv_pct(138));
    /* 过热度显示标签 */
	superheatTempLabel = lv_label_create(cont);  //创建过热度显示标签
	lv_obj_set_style_text_color(superheatTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(superheatTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 10,0);  //位置
    /* 过热度显示单位标签 */
    label = lv_label_create(cont);  //创建过热度显示单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(94), lv_pct(138));  //位置

    /* 出气温度标签 */
    label = lv_label_create(cont);
     lv_label_set_text(label, dispText[DA.typeLanguage].outt);
     lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(161));
    /* 压机出气温度显示标签 */
    outletTempLabel = lv_label_create(cont);  //创建压机出气温度显示标签
    lv_obj_set_style_text_color(outletTempLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(outletTempLabel, label, LV_ALIGN_OUT_RIGHT_MID, 20,0);  //位置
    /* 压机出气温度单位标签 */
    label = lv_label_create(cont);  //创建压机出气温度单位标签
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(50), lv_pct(161));  //位置

    /* 蒸发压力上限值 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "蒸发压力上限:");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(184));
    /* 蒸发压力上限值标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(184));
    /* 设置温度标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "SV:");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(207));
    /* 设备启停按钮 */
	runBtn = lv_btn_create(cont);  //创建EEV控制方式按钮
	lv_obj_add_style(runBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(runBtn, lv_palette_main(LV_PALETTE_ORANGE), LV_STATE_DEFAULT);  //点击颜色
	lv_obj_set_style_bg_color(runBtn, lv_palette_main(LV_PALETTE_BLUE), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(runBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
	lv_obj_add_event_cb(runBtn, UI_factory_eev_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 设备启停按钮标签 */
	runLabel = lv_label_create(cont);
	lv_label_set_text(runLabel, dispText[DA.typeLanguage].run);
	lv_obj_set_style_text_color(runLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(runLabel, runBtn, LV_ALIGN_CENTER, 0, 0);  //位置
    /* 设置温度 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(207));

    /* 辅助阀使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].auxEnable);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(230));
    /* 辅助阀无按钮 */
    auxNoneBtn = lv_btn_create(cont);  //创建辅助阀无按钮
    lv_obj_add_style(auxNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(auxNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(auxNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(auxNoneBtn, UI_factory_eev_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 辅助阀有按钮 */
    auxWithBtn = lv_btn_create(cont);  //创建辅助阀有按钮
    lv_obj_add_style(auxWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(auxWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(auxWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(auxWithBtn, UI_factory_eev_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 辅助阀无按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, auxNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 辅助阀有按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].with);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, auxWithBtn, LV_ALIGN_CENTER, 0, 0);

    /* 辅助阀开度标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].aux);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(253));
    /* 辅助阀实际开度标签 */
    pvAuxLabel = lv_label_create(cont);  //创建辅助阀实际开度标签
    lv_obj_set_style_text_color(pvAuxLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(pvAuxLabel, label, LV_ALIGN_OUT_RIGHT_MID, 10,0);  //位置
    /* 辅助阀实际开度单位标签 */
    label = lv_label_create(cont);  //辅助阀实际开度单位标签
    lv_label_set_text(label, "%");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, pvAuxLabel, LV_ALIGN_OUT_RIGHT_MID, 10,0);  //位置

	/* 下限温度2标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowt2);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(276));
    /* 下限温度2标签 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(276));

	/* 下限温度1标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowt1);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(299));
    /* 下限温度1标签 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(299));

	/* 上限温度1标签*/
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].hight1);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(322));
    /* 压机保护时长 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(322));

	/* 上限温度2标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].hight2);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(345));
    /* 压机保护时长 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(66), lv_pct(345));

	/* 更新按钮状态 */
    if (UP.gFlag_Auto == 0)
	{
		lv_obj_add_state(ctrlModeBtn, LV_STATE_CHECKED);
        lv_label_set_text(ctrlModeLabel, "AUTO");
	}
	else
	{
		lv_obj_clear_state(ctrlModeBtn, LV_STATE_CHECKED);
        lv_label_set_text(ctrlModeLabel, "JOG");
	}
    if (FP.ES_EEV3 == 0)
	{
		lv_obj_add_state(auxNoneBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(auxWithBtn, LV_STATE_CHECKED);
	}
	else
	{
		lv_obj_add_state(auxWithBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(auxNoneBtn, LV_STATE_CHECKED);
	}
}

/**
* @brief 工厂参数氟路报警按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_refalarm_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_CLICKED)
	{
		if(target == evaLowAutoBtn)  //蒸发压力下限自动计算按钮
		{
			if(FP.Type_Press1 == 0)
			{
				FP.Type_Press1 = 1;
                lv_label_set_text(evaLowAutoLabel, "AUTO");
                //lv_label_set_text(evaLowAutoLabel, dispText[DA.typeLanguage].running);
                lv_obj_clear_state(evaLowAutoBtn, LV_STATE_CHECKED);
			}
			else
			{
				FP.Type_Press1 = 0;
                lv_label_set_text(evaLowAutoLabel, "JOG");
                //lv_label_set_text(evaLowAutoLabel, dispText[DA.typeLanguage].running);
                lv_obj_add_state(evaLowAutoBtn, LV_STATE_CHECKED);
			}
			send_aux(&FP.Type_Press1);
		}
        else if (target == highPressSwNoneBtn)  //氟路高压开关没有按钮
        {
            FP.EW_Pc = 0;
            lv_obj_add_state(highPressSwNoneBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(highPressSwWithBtn, LV_STATE_CHECKED);
            send_aux(&FP.EW_Pc);
        }
        else if (target == highPressSwWithBtn)  //氟路高压开关有按钮
        {
            FP.EW_Pc = 1;
            lv_obj_add_state(highPressSwWithBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(highPressSwNoneBtn, LV_STATE_CHECKED);
            send_aux(&FP.EW_Pc);
        }
        else if (target == highPressSeNoneBtn)  //氟路高压传感器没有按钮
        {
            FP.ES_Pc = 0;
            lv_obj_add_state(highPressSeNoneBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(highPressSeWithBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_Pc);
        }
        else if (target == highPressSeWithBtn)   //氟路高压传感器有按钮
        {
            FP.ES_Pc = 1;
            lv_obj_add_state(highPressSeWithBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(highPressSeNoneBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_Pc);
        }
        else if (target == condTempNoneBtn)  //冷凝温度传感器没有按钮
        {
            FP.ES_Tc = 0;
            lv_obj_add_state(condTempNoneBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(condTempWithBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_Tc);
        }
        else if (target == condTempWithBtn)   //冷凝温度传感器有按钮
        {
            FP.ES_Tc = 1;
            lv_obj_add_state(condTempWithBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(condTempNoneBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_Tc);
        }
        else if (target == outletTempNoneBtn)  //出气温度传感器没有按钮
        {
            FP.ES_To = 0;
            lv_obj_add_state(outletTempNoneBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(outletTempWithBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_To);
        }
        else if (target == outletTempWithBtn)   //出气温度传感器有按钮
        {
            FP.ES_To = 1;
            lv_obj_add_state(outletTempWithBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(outletTempNoneBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_To);
        }
        else if (target == evaTempNoneBtn)   //蒸发温度传感器没有按钮
        {
            FP.ES_Te = 0;
            lv_obj_add_state(evaTempNoneBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(evaTempSwWithBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_Te);
        }
        else if (target == evaTempSwWithBtn)  //蒸发温度传感器有按钮
        {
            FP.ES_Te = 1;
            lv_obj_add_state(evaTempSwWithBtn, LV_STATE_CHECKED);
            lv_obj_clear_state(evaTempNoneBtn, LV_STATE_CHECKED);
            send_aux(&FP.ES_Te);
        }
	}
}

/**
  * @brief	电子膨胀阀界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facRefAlarm_init(void)
{
	uint8_t i = 0;

	/* 关联变量 */
	taFac_refalarm[0].data.userData.value = &FP.SV_Alarm_Press1;
	taFac_refalarm[0].data.userData.store_enable = 1;
	taFac_refalarm[1].data.userData.value = &FP.SV_AlarmTime_Press1;
	taFac_refalarm[1].data.userData.store_enable = 1;
	taFac_refalarm[2].data.userData.value = &FP.LL_TempPV_Te1;
	taFac_refalarm[2].data.userData.store_enable = 1;
	taFac_refalarm[3].data.userData.value = &FP.HL_TempPV_Te1;
	taFac_refalarm[3].data.userData.store_enable = 1;
	taFac_refalarm[4].data.userData.value = &FP.HL_TempPV_To1;
	taFac_refalarm[4].data.userData.store_enable = 1;
	taFac_refalarm[5].data.userData.value = &FP.SV_Alarm_Press2;
	taFac_refalarm[5].data.userData.store_enable = 1;
	taFac_refalarm[6].data.userData.value = &FP.SV_AlarmTime_Press2;
	taFac_refalarm[6].data.userData.store_enable = 1;
	taFac_refalarm[7].data.userData.value = &FP.LL_PassPV_Te1_nm;
	taFac_refalarm[7].data.userData.store_enable = 1;
	taFac_refalarm[8].data.userData.value = &FP.SV_Temp_Diff;
	taFac_refalarm[8].data.userData.store_enable = 1;
	taFac_refalarm[9].data.userData.value = &FP.SV_Open_And;
	taFac_refalarm[9].data.userData.store_enable = 1;

	/* 设置输入框属性 */
	for(i = 0; i < 2; i++)  //输入框大小位置等
	{
		taFac_refalarm[i].width = lv_pct(25);
		taFac_refalarm[i].height = lv_pct(10);
		taFac_refalarm[i].pos_x = lv_pct(60);
		taFac_refalarm[i].pos_y = lv_pct(23 * (i + 1) - 3);
		taFac_refalarm[i].max_length = 8;
		taFac_refalarm[i].one_line = true;
		taFac_refalarm[i].cursor_click_pos = false;
	}
	i = 2;
	taFac_refalarm[i].width = lv_pct(25);
	taFac_refalarm[i].height = lv_pct(10);
	taFac_refalarm[i].pos_x = lv_pct(25);
	taFac_refalarm[i].pos_y = lv_pct(23 * (i + 2) - 3);
	taFac_refalarm[i].max_length = 8;
	taFac_refalarm[i].one_line = true;
	taFac_refalarm[i].cursor_click_pos = false;
	for(i = 3; i < 8; i++)
	{
		taFac_refalarm[i].width = lv_pct(25);
		taFac_refalarm[i].height = lv_pct(10);
		taFac_refalarm[i].pos_x = lv_pct(60);
		taFac_refalarm[i].pos_y = lv_pct(23 * (i + 1) - 3);
		taFac_refalarm[i].max_length = 8;
		taFac_refalarm[i].one_line = true;
		taFac_refalarm[i].cursor_click_pos = false;
	}

	i = 0;
	taFac_refalarm[i].data.min = -10000;
	taFac_refalarm[i].data.max = 10000;
	taFac_refalarm[i].type = "%.1f";
	taFac_refalarm[i].accepted_chars = "0123456789-.";
	i = 1;
	taFac_refalarm[i].data.min = 0;
	taFac_refalarm[i].data.max = 9999;
	taFac_refalarm[i].type = "%d";
	taFac_refalarm[i].accepted_chars = "0123456789";
	i = 2;
	taFac_refalarm[i].data.min = -1000;
	taFac_refalarm[i].data.max = 1000;
	taFac_refalarm[i].type = "%.1f";
	taFac_refalarm[i].accepted_chars = "0123456789-.";
	for(i = 3; i < 5; i++)
	{
		taFac_refalarm[i].data.min = -1000;
		taFac_refalarm[i].data.max = 1000;
		taFac_refalarm[i].type = "%.1f";
		taFac_refalarm[i].accepted_chars = "0123456789-.";
	}
	i = 5;
	taFac_refalarm[i].data.min = -10000;
	taFac_refalarm[i].data.max = 10000;
	taFac_refalarm[i].type = "%.1f";
	taFac_refalarm[i].accepted_chars = "0123456789-.";
	i = 6;
	taFac_refalarm[i].data.min = 0;
	taFac_refalarm[i].data.max = 9999;
	taFac_refalarm[i].type = "%d";
	taFac_refalarm[i].accepted_chars = "0123456789";
	i = 7;
	taFac_refalarm[i].data.min = -10000;
	taFac_refalarm[i].data.max = 10000;
	taFac_refalarm[i].type = "%.1f";
	taFac_refalarm[i].accepted_chars = "0123456789-.";
	for(i = 8; i < UI_REFALARM_SUMQTY; i++)
	{
		taFac_refalarm[i].width = lv_pct(25);
		taFac_refalarm[i].height = lv_pct(10);
		taFac_refalarm[i].pos_x = lv_pct(60);
		taFac_refalarm[i].pos_y = lv_pct(40 * i - (i - 8)*18);
		taFac_refalarm[i].max_length = 8;
		taFac_refalarm[i].one_line = true;
		taFac_refalarm[i].cursor_click_pos = false;
		taFac_refalarm[i].data.min = 0;
		taFac_refalarm[i].data.max = 1000;
		taFac_refalarm[i].type = "%.1f";
		taFac_refalarm[i].accepted_chars = "0123456789-.";
	}
}

/**
  * @brief  氟路报警创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_refalarm(void)
{
	lv_obj_t* label = NULL;  //显示标签

    tab_facRefAlarm_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_REFALARM_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_refalarm[i]);
    }

    /* 蒸发压力下限设置模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowEvaSetMode);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* 蒸发压力下限自动计算按钮 */
    evaLowAutoBtn = lv_btn_create(cont);  //创建辅助阀有按钮
    lv_obj_add_style(evaLowAutoBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(evaLowAutoBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(evaLowAutoBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(65), 0);  //位置
    lv_obj_add_event_cb(evaLowAutoBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 蒸发压力下限自动计算按钮标签 */
    evaLowAutoLabel = lv_label_create(cont);
    lv_obj_set_style_text_color(evaLowAutoLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(evaLowAutoLabel, evaLowAutoBtn, LV_ALIGN_CENTER, 0, 0);

    /* 蒸发压力下限标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowEva);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 蒸发压力下限自动计算输入框压力单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(23));

    /* 蒸发压力下限报警确认时间标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].evaConfirmTime);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 蒸发压力下限确认时间输入框时间单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "S");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(46));

    /* 蒸发温度报警范围标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].evaT);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
	/* 蒸发温度 -- */
	label = lv_label_create(cont);
	lv_label_set_text(label, "--");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(53), lv_pct(92));
	/* 蒸发温度单位 */
	label = lv_label_create(cont);
	lv_label_set_text(label, "℃");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(92));

	/* 压机出气温度上限标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].compTempHigh);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(115));
    /* 压机温度报警上限输入框单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "℃");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(115));

    /* 冷凝压力报警上限标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].condPressHigh);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(138));
    /* 冷凝压力报警上限输入框单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(138));

    /* 冷凝压力确认时间标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].condConfirmTime);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(161));
	/* 冷凝压力上限确认时间输入框单位 */
	label = lv_label_create(cont);
	lv_label_set_text(label, "S");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	 lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(161));

    /* 氟压平衡低压报警标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].refNormLowPress);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(184));
	/* 氟压平衡低压报警输入框单位 */
	label = lv_label_create(cont);
	lv_label_set_text(label, "kPa");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	 lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(184));

    /* 氟路高压开关使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].highPressSw);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(207));
    /* 氟路高压开关没有按钮 */
    highPressSwNoneBtn = lv_btn_create(cont);  //创建氟路高压开关没有按钮
    lv_obj_add_style(highPressSwNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(highPressSwNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(highPressSwNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(35), 0);  //位置
    lv_obj_add_event_cb(highPressSwNoneBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 氟路高压开关有按钮 */
	highPressSwWithBtn = lv_btn_create(cont);  //创建氟路高压开关有按钮
	lv_obj_add_style(highPressSwWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(highPressSwWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(highPressSwWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(65), 0);  //位置
	lv_obj_add_event_cb(highPressSwWithBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 氟路高压开关没有按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].not);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, highPressSwNoneBtn, LV_ALIGN_CENTER, 0, 0);
	/* 氟路高压开关有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].detect);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, highPressSwWithBtn, LV_ALIGN_CENTER, 0, 0);

    /* 氟路高压传感器使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].highPressSe);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(230));
    /* 氟路高压传感器没有按钮 */
    highPressSeNoneBtn = lv_btn_create(cont);  //创建氟路高压传感器没有按钮
    lv_obj_add_style(highPressSeNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(highPressSeNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(highPressSeNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(35), 0);  //位置
    lv_obj_add_event_cb(highPressSeNoneBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 氟路高压传感器有按钮 */
    highPressSeWithBtn = lv_btn_create(cont);  //创建氟路高压传感器有按钮
	lv_obj_add_style(highPressSeWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(highPressSeWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(highPressSeWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(65), 0);  //位置
	lv_obj_add_event_cb(highPressSeWithBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 氟路高压传感器没有按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].not);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, highPressSeNoneBtn, LV_ALIGN_CENTER, 0, 0);
	/* 氟路高压传感器有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].detect);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, highPressSeWithBtn, LV_ALIGN_CENTER, 0, 0);

    /* 冷凝温度传感器使能标签 */
    label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].condTempSe);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(253));
    /* 冷凝温度传感器没有按钮 */
    condTempNoneBtn = lv_btn_create(cont);  //创建冷凝温度传感器没有按钮
    lv_obj_add_style(condTempNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(condTempNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(condTempNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(35), 0);  //位置
    lv_obj_add_event_cb(condTempNoneBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 冷凝温度传感器有按钮 */
    condTempWithBtn = lv_btn_create(cont);  //创建冷凝温度传感器有按钮
	lv_obj_add_style(condTempWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(condTempWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(condTempWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(65), 0);  //位置
	lv_obj_add_event_cb(condTempWithBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 冷凝温度传感器没有按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].not);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, condTempNoneBtn, LV_ALIGN_CENTER, 0, 0);
	/* 冷凝温度传感器有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].detect);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, condTempWithBtn, LV_ALIGN_CENTER, 0, 0);

	/* 出气温度传感器标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].outletTempSe);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(276));
	/* 出气温度传感器没有按钮 */
    outletTempNoneBtn = lv_btn_create(cont);  //创建出气温度传感器没有按钮
	lv_obj_add_style(outletTempNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(outletTempNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(outletTempNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(35), 0);  //位置
	lv_obj_add_event_cb(outletTempNoneBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 出气温度传感器有按钮 */
	outletTempWithBtn = lv_btn_create(cont);  //创建出气温度传感器有按钮
	lv_obj_add_style(outletTempWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(outletTempWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(outletTempWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(65), 0);  //位置
	lv_obj_add_event_cb(outletTempWithBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 出气温度传感器没有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].not);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, outletTempNoneBtn, LV_ALIGN_CENTER, 0, 0);
	/* 出气温度传感器有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].detect);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, outletTempWithBtn, LV_ALIGN_CENTER, 0, 0);

	/* 蒸发温度标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].evaTempSe);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(299));
	/* 蒸发温度传感器没有按钮 */
    evaTempNoneBtn = lv_btn_create(cont);  //创建蒸发温度传感器没有按钮
	lv_obj_add_style(evaTempNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(evaTempNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(evaTempNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(35), 0);  //位置
	lv_obj_add_event_cb(evaTempNoneBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 蒸发温度传感器有按钮 */
	evaTempSwWithBtn = lv_btn_create(cont);  //创建蒸发温度传感器有按钮
	lv_obj_add_style(evaTempSwWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
	lv_obj_set_style_bg_color(evaTempSwWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
	lv_obj_align_to(evaTempSwWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(65), 0);  //位置
	lv_obj_add_event_cb(evaTempSwWithBtn, UI_factory_refalarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
	/* 蒸发温度传感器没有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].not);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, evaTempNoneBtn, LV_ALIGN_CENTER, 0, 0);
	/* 蒸发温度传感器有按钮标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].detect);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align_to(label, evaTempSwWithBtn, LV_ALIGN_CENTER, 0, 0);
	/* 液温与蒸发温度差值标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].liquidEvapotDiff);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(322));
	/* 液温与蒸发温度差值单位 */
	label = lv_label_create(cont);
	lv_label_set_text(label, "℃");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(322));
	/* 制冷阀与旁通阀开度和标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].refriBypassOpen);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(345));
	/* 制冷阀与旁通阀开度和单位 */
	label = lv_label_create(cont);
	lv_label_set_text(label, "℃");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(345));
	/* 更新按钮状态 */
    if (FP.Type_Press1 == 0)
	{
		lv_obj_add_state(evaLowAutoBtn, LV_STATE_CHECKED);
        lv_label_set_text(evaLowAutoLabel, "AUTO");
	}
	else
	{
		lv_obj_clear_state(evaLowAutoBtn, LV_STATE_CHECKED);
        lv_label_set_text(evaLowAutoLabel, "JOG");
	}
    if (FP.EW_Pc == 0)
	{
		lv_obj_add_state(highPressSwNoneBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(highPressSwWithBtn, LV_STATE_CHECKED);
	}
	else
	{
		lv_obj_add_state(highPressSwWithBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(highPressSwNoneBtn, LV_STATE_CHECKED);
	}
    if (FP.ES_Pc == 0)
	{
		lv_obj_add_state(highPressSeNoneBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(highPressSeWithBtn, LV_STATE_CHECKED);
	}
	else
	{
		lv_obj_add_state(highPressSeWithBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(highPressSeNoneBtn, LV_STATE_CHECKED);
	}
    if (FP.ES_Tc == 0)
	{
		lv_obj_add_state(condTempNoneBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(condTempWithBtn, LV_STATE_CHECKED);
	}
	else
	{
		lv_obj_add_state(condTempWithBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(condTempNoneBtn, LV_STATE_CHECKED);
	}
    if (FP.ES_To == 0)
	{
		lv_obj_add_state(outletTempNoneBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(outletTempWithBtn, LV_STATE_CHECKED);
	}
	else
	{
		lv_obj_add_state(outletTempWithBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(outletTempNoneBtn, LV_STATE_CHECKED);
	}
    if (FP.ES_Te == 0)
	{
		lv_obj_add_state(evaTempNoneBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(evaTempSwWithBtn, LV_STATE_CHECKED);
	}
	else
	{
		lv_obj_add_state(evaTempSwWithBtn, LV_STATE_CHECKED);
		lv_obj_clear_state(evaTempNoneBtn, LV_STATE_CHECKED);
	}
}

/**
* @brief 工厂参数流量相关按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_flow_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_CLICKED)
	{
		if (target == flowNoneBtn)  //流量传感器无按钮
		{
			FP.ES_Flow = 0;
		    lv_obj_add_state(flowNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(flowAnalogBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(flowPulseBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_Flow);
		}
	    else if(target == flowAnalogBtn)  //流量传感器模拟信号按钮
	    {
	    	FP.ES_Flow = 1;
	        lv_obj_add_state(flowAnalogBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowNoneBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowPulseBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_Flow);
	    }
	    else if(target == flowPulseBtn)  //流量传感器脉冲信号按钮
	    {
	    	FP.ES_Flow = 2;
	        lv_obj_add_state(flowPulseBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowNoneBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowAnalogBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_Flow);
	    }
	    else if(target == flowCtrlNoneBtn)   //流量控制无按钮
	    {
	    	FP.ES_FlowContr = 0;
	        lv_obj_add_state(flowCtrlNoneBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowCtrlAnalogBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowCtrlCommBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_FlowContr);
	    }
	    else if(target == flowCtrlAnalogBtn)   //流量控制模拟信号按钮
	    {
	    	FP.ES_FlowContr = 1;
	        lv_obj_add_state(flowCtrlAnalogBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowCtrlNoneBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowCtrlCommBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_FlowContr);
	    }
	    else if(target == flowCtrlCommBtn)   //流量控制通讯信号按钮
	    {
	    	FP.ES_FlowContr = 2;
	        lv_obj_add_state(flowCtrlCommBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowCtrlNoneBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowCtrlAnalogBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_FlowContr);
	    }
	}
}

/**
  * @brief	流量相关界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facFlow_init(void)
{
	uint8_t i = 0;

	/* 关联变量 */
	taFac_flow[0].data.userData.value = &FP.LL_FlowPV;
	taFac_flow[0].data.userData.store_enable = 1;
	taFac_flow[1].data.userData.value = &FP.HL_FlowPV;
	taFac_flow[1].data.userData.store_enable = 1;
	taFac_flow[2].data.userData.value = &FP.LL_FlowSV;
	taFac_flow[2].data.userData.store_enable = 1;
	taFac_flow[3].data.userData.value = &FP.HL_FlowSV;
	taFac_flow[3].data.userData.store_enable = 1;
	taFac_flow[4].data.userData.value = &FP.K_FlowPulse;
	taFac_flow[4].data.userData.store_enable = 1;
	taFac_flow[5].data.userData.value = &FP.Fre_Pump_MAX;
	taFac_flow[5].data.userData.store_enable = 1;
	taFac_flow[6].data.userData.value = &FP.Fre_Pump_MIN;
	taFac_flow[6].data.userData.store_enable = 1;

    /* 设置输入框属性 */
	for(i = 0; i < 4; i++)
	{
		taFac_flow[i].data.min = 0;
		taFac_flow[i].data.max = 999;
		taFac_flow[i].type = "%.1f";
		taFac_flow[i].width = lv_pct(20);
		taFac_flow[i].height = lv_pct(10);
		taFac_flow[i].pos_x = lv_pct(30 + (i%2) * 35);
		taFac_flow[i].pos_y = lv_pct((i/2) * 23 + 43);
		taFac_flow[i].max_length = 8;
		taFac_flow[i].accepted_chars = "0123456789-.";
		taFac_flow[i].one_line = true;
		taFac_flow[i].cursor_click_pos = false;
	}
	i = 4;
	taFac_flow[i].data.min = 0;
	taFac_flow[i].data.max = 999;
	taFac_flow[i].type = "%0.1f";
	taFac_flow[i].width = lv_pct(20);
	taFac_flow[i].height = lv_pct(10);
	taFac_flow[i].pos_x = lv_pct(65);
	taFac_flow[i].pos_y = lv_pct(89);
	taFac_flow[i].max_length = 8;
	taFac_flow[i].accepted_chars = "0123456789.";
	taFac_flow[i].one_line = true;
	taFac_flow[i].cursor_click_pos = false;
	for(i = 5; i < UI_FLOW_SUMQTY; i++)
	{
		taFac_flow[i].data.min = 0;
		taFac_flow[i].data.max = 999;
		taFac_flow[i].type = "%d";
		taFac_flow[i].width = lv_pct(20);
		taFac_flow[i].height = lv_pct(10);
		taFac_flow[i].pos_x = lv_pct(65);
		taFac_flow[i].pos_y = lv_pct(23 * i - 3);
		taFac_flow[i].max_length = 8;
		taFac_flow[i].accepted_chars = "0123456789-";
		taFac_flow[i].one_line = true;
		taFac_flow[i].cursor_click_pos = false;
	}
}

/**
  * @brief  流量相关创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_flow(void)
{
	lv_obj_t* label = NULL;  //显示标签

	tab_facFlow_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_FLOW_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_flow[i]);
    }

	/* 流量传感器选择标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].flowSe);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* 流量传感器无按钮 */
    flowNoneBtn = lv_btn_create(cont);  //创建流量传感器无按钮
    lv_obj_add_style(flowNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(flowNoneBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(flowNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(25), 0);  //位置
    lv_obj_add_event_cb(flowNoneBtn, UI_factory_flow_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量传感器模拟信号按钮 */
    flowAnalogBtn = lv_btn_create(cont);  //创建流量传感器模拟信号按钮
    lv_obj_add_style(flowAnalogBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(flowAnalogBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(flowAnalogBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowAnalogBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(49), 0);  //位置
    lv_obj_add_event_cb(flowAnalogBtn, UI_factory_flow_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量传感器脉冲信号按钮 */
    flowPulseBtn = lv_btn_create(cont);  //创建流量传感器脉冲信号按钮
    lv_obj_add_style(flowPulseBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(flowPulseBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(flowPulseBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowPulseBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(73), 0);  //位置
    lv_obj_add_event_cb(flowPulseBtn, UI_factory_flow_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量传感器无标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 流量传感器模拟信号标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].analog);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowAnalogBtn, LV_ALIGN_CENTER, 0, 0);
    /* 流量传感器脉冲信号标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].pluse);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowPulseBtn, LV_ALIGN_CENTER, 0, 0);

	/* 流量控制选择标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].flowCt);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 流量控制无按钮 */
    flowCtrlNoneBtn = lv_btn_create(cont);  //创建流量控制无按钮
    lv_obj_add_style(flowCtrlNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(flowCtrlNoneBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(flowCtrlNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowCtrlNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(25), 0);  //位置
    lv_obj_add_event_cb(flowCtrlNoneBtn, UI_factory_flow_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量控制模拟信号按钮 */
    flowCtrlAnalogBtn = lv_btn_create(cont);  //创建流量控制模拟信号按钮
    lv_obj_add_style(flowCtrlAnalogBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(flowCtrlAnalogBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(flowCtrlAnalogBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowCtrlAnalogBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(49), 0);  //位置
    lv_obj_add_event_cb(flowCtrlAnalogBtn, UI_factory_flow_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量控制通讯信号按钮 */
    flowCtrlCommBtn = lv_btn_create(cont);  //创建流量控制通讯信号按钮
    lv_obj_add_style(flowCtrlCommBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(flowCtrlCommBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(flowCtrlCommBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowCtrlCommBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(73), 0);  //位置
    lv_obj_add_event_cb(flowCtrlCommBtn, UI_factory_flow_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量控制无标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowCtrlNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 流量控制模拟信号标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].analog);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowCtrlAnalogBtn, LV_ALIGN_CENTER, 0, 0);
    /* 流量控制通讯信号标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].comm);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowCtrlCommBtn, LV_ALIGN_CENTER, 0, 0);

    /* 测流范围标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].flowRnge);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 测流范围下限 -- */
    label = lv_label_create(cont);
    lv_label_set_text(label, "--");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(55), lv_pct(46));
    /* 测流范围上限 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "LPM");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(46));

    /* 控流范围标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ctrlFlowRnge);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 控流范围下限 -- */
    label = lv_label_create(cont);
    lv_label_set_text(label, "--");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(55), lv_pct(69));
    /* 控流范围上限 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "LPM");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(69));

    /* 脉冲系数标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].pluseFactor);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));

    /* 水泵运行最大频率标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].maxFrequency);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(115));
    /* 水泵运行最大频率 Hz */
    label = lv_label_create(cont);
    lv_label_set_text(label, "Hz");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(115));

    /* 水泵运行最小频率标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].minFrequency);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(138));
    /* 水泵运行最小频率 Hz */
    label = lv_label_create(cont);
    lv_label_set_text(label, "Hz");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(138));

    /* 水泵运行目标频率标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].targetValue);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(161));
    /* 水泵频率实时显示标签 */
    pumpFreLabel = lv_label_create(cont); //创建水泵频率实时显示标签
    lv_label_set_text_fmt(pumpFreLabel, "%d", UP.gSV_Comp);  //更新变频器目标值
    lv_obj_set_style_text_color(pumpFreLabel, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(pumpFreLabel, label, LV_ALIGN_OUT_RIGHT_MID, 100,0);  //位置
    /* 水泵运行目标频率 ×0.1% */
    label = lv_label_create(cont);
    lv_label_set_text(label, "×0.1Hz");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, pumpFreLabel, LV_ALIGN_OUT_RIGHT_MID, 10, 0);  //位置

	/* 更新按钮状态 */
    if(FP.ES_Flow == 0)
    {
        lv_obj_add_state(flowNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowAnalogBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowPulseBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_Flow == 1)
    {
        lv_obj_add_state(flowAnalogBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowPulseBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_Flow == 2)
    {
        lv_obj_add_state(flowPulseBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowAnalogBtn, LV_STATE_CHECKED);
    }
    if(FP.ES_FlowContr == 0)
    {
        lv_obj_add_state(flowCtrlNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowCtrlAnalogBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowCtrlCommBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_FlowContr == 1)
    {
        lv_obj_add_state(flowCtrlAnalogBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowCtrlNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowCtrlCommBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_FlowContr == 2)
    {
        lv_obj_add_state(flowCtrlCommBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowCtrlNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowCtrlAnalogBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂参数压力相关按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_press_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_CLICKED)
	{
		if (target == outPressNoneBtn)  //出液压力传感器无按钮
		{
			FP.ES_Press_Out = 0;
			lv_obj_add_state(outPressNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(outPressWithBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_Press_Out);
		}
	    else if(target == outPressWithBtn)  //出液压力传感器有按钮
	    {
	    	FP.ES_Press_Out = 1;
	        lv_obj_add_state(outPressWithBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(outPressNoneBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_Press_Out);
	    }
	    else if(target == inPressNoneBtn)  //回液压力传感器无按钮
	    {
	    	FP.ES_Press_In = 0;
		    lv_obj_add_state(inPressNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(inPressWithBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_Press_In);
	    }
	    else if(target == inPressWithBtn)   //回液压力传感器有按钮
	    {
	    	FP.ES_Press_In = 1;
	        lv_obj_add_state(inPressWithBtn, LV_STATE_CHECKED);
		    lv_obj_clear_state(inPressNoneBtn, LV_STATE_CHECKED);
		    send_aux(&FP.ES_Press_In);
	    }

	    else if(target == pressCtrlNoneBtn)  //压力控制无按钮
	    {
	    	FP.ES_FlowContr = 0;
			lv_obj_add_state(pressCtrlNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(pressCtrlAnalogBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(pressCtrlCommBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_FlowContr);
	    }
	    else if(target == pressCtrlAnalogBtn)  //压力控制模拟信号按钮
	    {
	    	FP.ES_FlowContr = 1;
			lv_obj_add_state(pressCtrlAnalogBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(pressCtrlNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(pressCtrlCommBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_FlowContr);
	    }
	    else if(target == pressCtrlCommBtn)   //压力控制通讯信号按钮
	    {
	    	FP.ES_FlowContr = 2;
			lv_obj_add_state(pressCtrlCommBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(pressCtrlNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(pressCtrlAnalogBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_FlowContr);
	    }
	}
	if (code == LV_EVENT_VALUE_CHANGED)
	{
		if (target == sensorSignalDropdown)  //工厂输入1下拉框
		{
			FP.Sensor_type = lv_dropdown_get_selected(target);
			send_aux(&FP.Sensor_type);
		}
	}
}

/**
  * @brief	压力相关界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facPress_init(void)
{
	uint8_t i = 0;
	/* 关联变量 */
	taFac_press[0].data.userData.value = &FP.LL_PressPV;
	taFac_press[0].data.userData.store_enable = 1;
	taFac_press[1].data.userData.value = &FP.HL_PressPV;
	taFac_press[1].data.userData.store_enable = 1;
	taFac_press[2].data.userData.value = &FP.LL_PressSV;
	taFac_press[2].data.userData.store_enable = 1;
	taFac_press[3].data.userData.value = &FP.HL_PressSV;
	taFac_press[3].data.userData.store_enable = 1;

    /* 设置输入框属性 */
	for(i = 0; i < UI_PRESS_SUMQTY; i++)
	{
		taFac_press[i].data.min = 0;
		taFac_press[i].data.max = 999;
		taFac_press[i].type = "%.1f";
		taFac_press[i].width = lv_pct(20);
		taFac_press[i].height = lv_pct(10);
		taFac_press[i].pos_x = lv_pct(30 + (i%2) * 35);
		taFac_press[i].pos_y = lv_pct((i/2) * 46 + 43);
		taFac_press[i].max_length = 8;
		taFac_press[i].accepted_chars = "0123456789-.";
		taFac_press[i].one_line = true;
		taFac_press[i].cursor_click_pos = false;
	}
}

/**
  * @brief  压力相关创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_press(void)
{
	lv_obj_t* label = NULL;  //显示标签

	tab_facPress_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_PRESS_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_press[i]);
    }

	/* 出液压力使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].outlet);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* 出液压力传感器无按钮 */
    outPressNoneBtn = lv_btn_create(cont);  //创建出液压力传感器无按钮
    lv_obj_add_style(outPressNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(outPressNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(outPressNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(25), 0);  //位置
    lv_obj_add_event_cb(outPressNoneBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 出液压力传感器有按钮 */
    outPressWithBtn = lv_btn_create(cont);  //创建出液压力传感器有按钮
    lv_obj_add_style(outPressWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(outPressWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(outPressWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(55), 0);  //位置
    lv_obj_add_event_cb(outPressWithBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 出液压力传感器无按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, outPressNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 出液压力传感器有按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].with);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, outPressWithBtn, LV_ALIGN_CENTER, 0, 0);

	/* 回液压力使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].liquid);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 回液压力传感器无按钮 */
    inPressNoneBtn = lv_btn_create(cont);  //创建回液压力传感器无按钮
    lv_obj_add_style(inPressNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(inPressNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(inPressNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(25), 0);  //位置
    lv_obj_add_event_cb(inPressNoneBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 回液压力传感器有按钮 */
    inPressWithBtn = lv_btn_create(cont);  //创建回液压力传感器有按钮
    lv_obj_add_style(inPressWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(inPressWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(inPressWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(55), 0);  //位置
    lv_obj_add_event_cb(inPressWithBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 回液压力传感器无按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, inPressNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 回液压力传感器有按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].with);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, inPressWithBtn, LV_ALIGN_CENTER, 0, 0);

	/* 测压范围标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].pressRnge);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
	/* 测压范围下限 -- */
	label = lv_label_create(cont);
	lv_label_set_text(label, "--");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(55), lv_pct(46));
	/* 测压范围上限 单位 */
	label = lv_label_create(cont);
	lv_label_set_text(label, "kPa");
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(46));

	/* 压力控制选择标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].pressCt);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 压力控制无按钮 */
    pressCtrlNoneBtn = lv_btn_create(cont);  //创建压力控制无按钮
    lv_obj_add_style(pressCtrlNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(pressCtrlNoneBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(pressCtrlNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(pressCtrlNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(25), 0);  //位置
    lv_obj_add_event_cb(pressCtrlNoneBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 压力控制模拟信号按钮 */
    pressCtrlAnalogBtn = lv_btn_create(cont);  //创建压力控制模拟信号按钮
    lv_obj_add_style(pressCtrlAnalogBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(pressCtrlAnalogBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(pressCtrlAnalogBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(pressCtrlAnalogBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(49), 0);  //位置
    lv_obj_add_event_cb(pressCtrlAnalogBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 压力控制通讯信号按钮 */
    pressCtrlCommBtn = lv_btn_create(cont);  //创建压力控制通讯信号按钮
    lv_obj_add_style(pressCtrlCommBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_width(pressCtrlCommBtn, lv_pct(22), LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(pressCtrlCommBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(pressCtrlCommBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(73), 0);  //位置
    lv_obj_add_event_cb(pressCtrlCommBtn, UI_factory_press_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 压力控制无标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, pressCtrlNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 压力控制模拟信号标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].analog);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, pressCtrlAnalogBtn, LV_ALIGN_CENTER, 0, 0);
    /* 压力控制通讯信号标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].comm);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, pressCtrlCommBtn, LV_ALIGN_CENTER, 0, 0);

    /* 控压范围标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].ctrlPressRnge);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));
    /* 控压范围下限 -- */
    label = lv_label_create(cont);
    lv_label_set_text(label, "--");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(55), lv_pct(92));
    /* 控压范围上限 单位 */
    label = lv_label_create(cont);
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(88), lv_pct(92));

    /* 传感器信号类型标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].sensorSignal);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(115));
    /* 传感器信号类型下拉框 */
    sensorSignalDropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(sensorSignalDropdown, dispText[DA.typeLanguage].sensorSignalDropdown);
    lv_dropdown_set_selected(sensorSignalDropdown, FP.Sensor_type);
    lv_obj_set_width(sensorSignalDropdown, lv_pct(50));
    lv_obj_align_to(sensorSignalDropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(sensorSignalDropdown, false);
    lv_obj_set_style_bg_color(sensorSignalDropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(sensorSignalDropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(sensorSignalDropdown, UI_factory_press_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

	/* 更新按钮状态 */
    if(FP.ES_Press_Out == 0)
    {
        lv_obj_add_state(outPressNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(outPressWithBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_Press_Out == 1)
    {
        lv_obj_add_state(outPressWithBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(outPressNoneBtn, LV_STATE_CHECKED);
    }
    if(FP.ES_Press_In == 0)
    {
        lv_obj_add_state(inPressNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(inPressWithBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_Press_In == 1)
    {
        lv_obj_add_state(inPressWithBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(inPressNoneBtn, LV_STATE_CHECKED);
    }
    if(FP.ES_FlowContr == 0)
    {
        lv_obj_add_state(pressCtrlNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pressCtrlAnalogBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pressCtrlCommBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_FlowContr == 1)
    {
        lv_obj_add_state(pressCtrlAnalogBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pressCtrlNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pressCtrlCommBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_FlowContr == 2)
    {
        lv_obj_add_state(pressCtrlCommBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pressCtrlNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(pressCtrlAnalogBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂参数检测配置按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_check_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_VALUE_CHANGED)
	{
		if (target == factInput1dropdown)  //工厂输入1下拉框
		{
			FP.Digital_In1_Definition = lv_dropdown_get_selected(target);
			send_aux(&FP.Digital_In1_Definition);
		}
		else if (target == factInput2dropdown)  //工厂输入2下拉框
		{
			FP.Digital_In2_Definition = lv_dropdown_get_selected(target);
			send_aux(&FP.Digital_In2_Definition);
		}
		else if (target == factInput3dropdown)  //工厂输入3下拉框
		{
			FP.Digital_In3_Definition = lv_dropdown_get_selected(target);
			send_aux(&FP.Digital_In3_Definition);
		}
		else if (target == factInput4dropdown)  //工厂输入4下拉框
		{
			FP.Digital_In4_Definition = lv_dropdown_get_selected(target);
			send_aux(&FP.Digital_In4_Definition);
		}
		else if (target == lowFlowTypedropdown)  //低流量报警类型下拉框
		{
			FP.ES_InFlowLL = lv_dropdown_get_selected(target);
			send_aux(&FP.ES_InFlowLL);
		}
		else if (target == levelSelectdropdown)  //液位开关选择下拉框
		{
			FP.Type_Level = lv_dropdown_get_selected(target);
			send_aux(&FP.Type_Level);
		}
	}
	else if (code == LV_EVENT_CLICKED)
	{
		if (target == waterNoneBtn)  //水质检测失能按钮
		{
			FP.ES_DI = 0;
			lv_obj_add_state(waterNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(waterWithBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_DI);
		}
	    else if(target == waterWithBtn)  //水质检测使能按钮
	    {
	    	FP.ES_DI = 1;
	        lv_obj_add_state(waterWithBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(waterNoneBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_DI);
	    }
	    else if(target == coolingNoneBtn)  //冷却水检测失能按钮
	    {
	    	FP.ES_COWFlowLL = 0;
		    lv_obj_add_state(coolingNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(coolingWithBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_COWFlowLL);
	    }
	    else if(target == coolingWithBtn)   //冷却水检测使能按钮
	    {
	    	FP.ES_COWFlowLL = 1;
	        lv_obj_add_state(coolingWithBtn, LV_STATE_CHECKED);
		    lv_obj_clear_state(coolingNoneBtn, LV_STATE_CHECKED);
		    send_aux(&FP.ES_COWFlowLL);
	    }
	    else if(target == heartNoneBtn)  //冷却水检测失能按钮
	    {
	    	FP.ES_Ho = 0;
		    lv_obj_add_state(heartNoneBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(heartWithBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_Ho);
	    }
	    else if(target == heartWithBtn)   //冷却水检测使能按钮
	    {
	    	FP.ES_Ho = 1;
	        lv_obj_add_state(heartWithBtn, LV_STATE_CHECKED);
		    lv_obj_clear_state(heartNoneBtn, LV_STATE_CHECKED);
		    send_aux(&FP.ES_Ho);
	    }
	}
}

/**
  * @brief  检测配置创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_check(void)
{
    lv_obj_t* label;  //显示标签

    /* 工厂输入1标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].factInput1);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* 工厂输入1下拉框 */
    factInput1dropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(factInput1dropdown, dispText[DA.typeLanguage].factDropdownInput1);
    lv_dropdown_set_selected(factInput1dropdown, FP.Digital_In1_Definition);
    lv_obj_set_width(factInput1dropdown, lv_pct(50));
    lv_obj_align_to(factInput1dropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(factInput1dropdown, false);
    lv_obj_set_style_bg_color(factInput1dropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(factInput1dropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(factInput1dropdown, UI_factory_check_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

    /* 工厂输入2标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].factInput2);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 工厂输入2下拉框 */
    factInput2dropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(factInput2dropdown, dispText[DA.typeLanguage].factDropdownInput2);
    lv_dropdown_set_selected(factInput2dropdown, FP.Digital_In2_Definition);
    lv_obj_set_width(factInput2dropdown, lv_pct(50));
    lv_obj_align_to(factInput2dropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(factInput2dropdown, false);
    lv_obj_set_style_bg_color(factInput2dropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(factInput2dropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(factInput2dropdown, UI_factory_check_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

    /* 工厂输入3标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].factInput3);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 工厂输入3下拉框 */
    factInput3dropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(factInput3dropdown, dispText[DA.typeLanguage].factDropdownInput3);
    lv_dropdown_set_selected(factInput3dropdown, FP.Digital_In3_Definition);
    lv_obj_set_width(factInput3dropdown, lv_pct(50));
    lv_obj_align_to(factInput3dropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(factInput3dropdown, false);
    lv_obj_set_style_bg_color(factInput3dropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(factInput3dropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(factInput3dropdown, UI_factory_check_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

    /* 工厂输入4标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].factInput4);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 工厂输入4下拉框 */
    factInput4dropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(factInput4dropdown, dispText[DA.typeLanguage].factDropdownInput4);
    lv_dropdown_set_selected(factInput4dropdown, FP.Digital_In4_Definition);
    lv_obj_set_width(factInput4dropdown, lv_pct(50));
    lv_obj_align_to(factInput4dropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(factInput4dropdown, false);
    lv_obj_set_style_bg_color(factInput4dropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(factInput4dropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(factInput4dropdown, UI_factory_check_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

	/* 水质检测标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].water);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));
    /* 水质检测失能按钮 */
    waterNoneBtn = lv_btn_create(cont);  //创建水质检测失能按钮
    lv_obj_add_style(waterNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(waterNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(waterNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(waterNoneBtn, UI_factory_check_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 水质检测使能按钮 */
    waterWithBtn = lv_btn_create(cont);  //创建水质检测使能按钮
    lv_obj_add_style(waterWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(waterWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(waterWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(waterWithBtn, UI_factory_check_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 水质检测失能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].not);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, waterNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 水质检测使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].detect);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, waterWithBtn, LV_ALIGN_CENTER, 0, 0);

	/* 冷却水检测标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].cooling);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(115));
    /* 冷却水检测失能按钮 */
    coolingNoneBtn = lv_btn_create(cont);  //创建冷却水检测失能按钮
    lv_obj_add_style(coolingNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(coolingNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(coolingNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(coolingNoneBtn, UI_factory_check_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 冷却水检测使能按钮 */
    coolingWithBtn = lv_btn_create(cont);  //创建冷却水检测使能按钮
    lv_obj_add_style(coolingWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(coolingWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(coolingWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(coolingWithBtn, UI_factory_check_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 冷却水检测失能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].not);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, coolingNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 冷却水检测使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].detect);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, coolingWithBtn, LV_ALIGN_CENTER, 0, 0);

    /* 低流量报警类型下拉框标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowFType);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(138));
    /* 低流量报警类型下拉框 */
    lowFlowTypedropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(lowFlowTypedropdown, dispText[DA.typeLanguage].lowFTypeDropdown);
    lv_dropdown_set_selected(lowFlowTypedropdown, FP.ES_InFlowLL);
    lv_obj_set_width(lowFlowTypedropdown, lv_pct(50));
    lv_obj_align_to(lowFlowTypedropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(lowFlowTypedropdown, false);
    lv_obj_set_style_bg_color(lowFlowTypedropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(lowFlowTypedropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(lowFlowTypedropdown, UI_factory_check_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

    /* 液位开光选择下拉框标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].levelSelect);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(161));
    /* 液位开关选择下拉框 */
    levelSelectdropdown = lv_dropdown_create(cont);
    lv_dropdown_set_options(levelSelectdropdown, dispText[DA.typeLanguage].levelSelectDropdown);
    lv_dropdown_set_selected(levelSelectdropdown, FP.Type_Level);
    lv_obj_set_width(levelSelectdropdown, lv_pct(50));
    lv_obj_align_to(levelSelectdropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
    lv_dropdown_set_selected_highlight(levelSelectdropdown, false);
    lv_obj_set_style_bg_color(levelSelectdropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
    lv_obj_set_style_bg_opa(levelSelectdropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_add_event_cb(levelSelectdropdown, UI_factory_check_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

	/* 加热器检测标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].heartSwitch);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(184));
    /* 加热器检测失能按钮 */
    heartNoneBtn = lv_btn_create(cont);  //创建冷却水检测失能按钮
    lv_obj_add_style(heartNoneBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(heartNoneBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(heartNoneBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(heartNoneBtn, UI_factory_check_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 加热器检测使能按钮 */
    heartWithBtn = lv_btn_create(cont);  //创建冷却水检测使能按钮
    lv_obj_add_style(heartWithBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(heartWithBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(heartWithBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(heartWithBtn, UI_factory_check_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 加热器检测失能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].not);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, heartNoneBtn, LV_ALIGN_CENTER, 0, 0);
    /* 加热器检测使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].detect);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, heartWithBtn, LV_ALIGN_CENTER, 0, 0);
	/* 更新按钮状态 */
    if(FP.ES_DI == 0)
    {
        lv_obj_add_state(waterNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(waterWithBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_DI == 1)
    {
        lv_obj_add_state(waterWithBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(waterNoneBtn, LV_STATE_CHECKED);
    }
    if(FP.ES_COWFlowLL == 0)
    {
        lv_obj_add_state(coolingNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(coolingWithBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_COWFlowLL == 1)
    {
        lv_obj_add_state(coolingWithBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(coolingNoneBtn, LV_STATE_CHECKED);
    }
    if(FP.ES_Ho == 0)
    {
        lv_obj_add_state(heartNoneBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(heartWithBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_Ho == 1)
    {
        lv_obj_add_state(heartWithBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(heartNoneBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂参数端口配置按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_port_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_VALUE_CHANGED)
	{
		if (target == factOut1dropdown)  //工厂输出1下拉框
		{
			FP.Digital_Out1_Definition = lv_dropdown_get_selected(target);
			send_aux(&FP.Digital_Out1_Definition);
		}
		else if (target == factOut2dropdown)  //工厂输出2下拉框
		{
			FP.Digital_Out2_Definition = lv_dropdown_get_selected(target);
			send_aux(&FP.Digital_Out2_Definition);
		}
	}
}

/**
  * @brief	端口配置界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facPort_init(void)
{
	uint8_t i = 0;
	/* 关联变量 */
	taFac_port[0].data.userData.value = &FP.SV_Temp_OpenHighValve;
	taFac_port[0].data.userData.store_enable = 1;
	taFac_port[1].data.userData.value = &FP.SV_Temp_CloseHighValve;
	taFac_port[1].data.userData.store_enable = 1;
	taFac_port[2].data.userData.value = &FP.SV_Temp_OpenLowValve;
	taFac_port[2].data.userData.store_enable = 1;
	taFac_port[3].data.userData.value = &FP.SV_Temp_CloseLowValve;
	taFac_port[3].data.userData.store_enable = 1;

    /* 设置输入框属性 */
	for(i = 0; i < UI_PORT_SUMQTY; i++)
	{
		taFac_port[i].type = "%.1f";
		taFac_port[i].width = lv_pct(25);
		taFac_port[i].height = lv_pct(10);
		taFac_port[i].pos_x = lv_pct(20 + (i%2) * 40);
		taFac_port[i].pos_y = lv_pct((i/2) * 23 + 66);
		taFac_port[i].max_length = 8;
		taFac_port[i].accepted_chars = "0123456789-.";
		taFac_port[i].one_line = true;
		taFac_port[i].cursor_click_pos = false;
	}
	i = 0;
	taFac_port[i].data.min = FP.SV_Temp_CloseHighValve;
	taFac_port[i].data.max = 999;
	i = 1;
	taFac_port[i].data.min = 0;
	taFac_port[i].data.max = FP.SV_Temp_OpenHighValve;
	i = 2;
	taFac_port[i].data.min = 0;
	taFac_port[i].data.max = FP.SV_Temp_CloseLowValve;
	i = 3;
	taFac_port[i].data.min = FP.SV_Temp_OpenLowValve;
	taFac_port[i].data.max = 999;
}

/**
  * @brief  端口配置创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_port(void)
{
	lv_obj_t* label = NULL;  //显示标签

    tab_facPort_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_PORT_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_port[i]);
    }

	/* 工厂输出1标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].factOut1);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
	/* 工厂输出1下拉框 */
	factOut1dropdown = lv_dropdown_create(cont);
	lv_dropdown_set_options(factOut1dropdown, dispText[DA.typeLanguage].factDropdownOut1);
	lv_dropdown_set_selected(factOut1dropdown, FP.Digital_Out1_Definition);
	lv_obj_set_width(factOut1dropdown, lv_pct(50));
	lv_obj_align_to(factOut1dropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
	lv_dropdown_set_selected_highlight(factOut1dropdown, false);
	lv_obj_set_style_bg_color(factOut1dropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
	lv_obj_set_style_bg_opa(factOut1dropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
	lv_obj_add_event_cb(factOut1dropdown, UI_factory_port_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

	/* 工厂输出2标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].factOut2);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
	/* 工厂输出2下拉框 */
	factOut2dropdown = lv_dropdown_create(cont);
	lv_dropdown_set_options(factOut2dropdown, dispText[DA.typeLanguage].factDropdownOut2);
	lv_dropdown_set_selected(factOut2dropdown, FP.Digital_Out2_Definition);
	lv_obj_set_width(factOut2dropdown, lv_pct(50));
	lv_obj_align_to(factOut2dropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
	lv_dropdown_set_selected_highlight(factOut2dropdown, false);
	lv_obj_set_style_bg_color(factOut2dropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
	lv_obj_set_style_bg_opa(factOut2dropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
	lv_obj_add_event_cb(factOut2dropdown, UI_factory_port_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

	/* 高温辅助制冷阀标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].HTAV);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
    /* 高温辅助制冷阀开启温度输入框单位 ℃ On */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].tOn);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(46), lv_pct(69));
    /* 高温辅助制冷阀关闭温度输入框单位 ℃ Off */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].tOff);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(86), lv_pct(69));

	/* 低温辅助制冷阀标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].LTAV);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));

    /* 低温辅助制冷阀开启温度输入框单位 ℃ On */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].tOn);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(46), lv_pct(92));

    /* 低温辅助制冷阀关闭温度输入框单位 ℃ Off */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].tOff);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(86), lv_pct(92));
}

/**
* @brief 工厂参数报警配置按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_alarm_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_CLICKED)
	{
		if (target == tempHighAlarmBtn)  //工厂保护温度上限报警按钮
		{
			FP.Type_HL_TempFF = 0;
			lv_obj_add_state(tempHighAlarmBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(tempHighFaultBtn, LV_STATE_CHECKED);
			send_aux(&FP.Type_HL_TempFF);
		}
	    else if(target == tempHighFaultBtn)  //工厂保护温度上限故障按钮
	    {
	    	FP.Type_HL_TempFF = 1;
	        lv_obj_add_state(tempHighFaultBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(tempHighAlarmBtn, LV_STATE_CHECKED);
	        send_aux(&FP.Type_HL_TempFF);
	    }
	    else if (target == tempLowAlarmBtn)  //工厂保护温度下限报警按钮
		{
			FP.Type_LL_TempFF = 0;
			lv_obj_add_state(tempLowAlarmBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(tempLowFaultBtn, LV_STATE_CHECKED);
			send_aux(&FP.Type_LL_TempFF);
		}
	    else if(target == tempLowFaultBtn)  //工厂保护温度下限故障按钮
	    {
	    	FP.Type_LL_TempFF = 1;
	        lv_obj_add_state(tempLowFaultBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(tempLowAlarmBtn, LV_STATE_CHECKED);
	        send_aux(&FP.Type_LL_TempFF);
	    }
	    else if (target == flowAlarmBtn)  //工厂低流量报警按钮
		{
			FP.Type_LL_Flow = 0;
			lv_obj_add_state(flowAlarmBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(flowFaultBtn, LV_STATE_CHECKED);
			send_aux(&FP.Type_LL_Flow);
		}
	    else if(target == flowFaultBtn)  //工厂低流量故障按钮
	    {
	    	FP.Type_LL_Flow = 1;
	        lv_obj_add_state(flowFaultBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(flowAlarmBtn, LV_STATE_CHECKED);
	        send_aux(&FP.Type_LL_Flow);
	    }
	    else if (target == levelAlarmBtn)  //工厂低液位报警按钮
		{
			FP.Type_LL_Level = 0;
			lv_obj_add_state(levelAlarmBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(levelFaultBtn, LV_STATE_CHECKED);
			send_aux(&FP.Type_LL_Level);
		}
	    else if(target == levelFaultBtn)  //工厂低液位故障按钮
	    {
	    	FP.Type_LL_Level = 1;
	        lv_obj_add_state(levelFaultBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(levelAlarmBtn, LV_STATE_CHECKED);
	        send_aux(&FP.Type_LL_Level);
	    }
	    else if(target == clearMessageBtn)  // 清除历史报警
	    {

			while(historyInfoNodeQty > 0)		/* 如果历史信息节点数量大于0 */
			{
				list_delTailNode(&listNode_historyInfo);/* 从历史信息列表尾部删除一个节点 */
				historyInfoNodeQty--;
			}
	    	if (g_RW_State == RW_READY)
	    	{
	    		g_RW_State = RW_WRITE_NAND_ALARM;
	    	}
	    }
	}
}

/**
  * @brief	端口配置界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facAlarm_init(void)
{
	uint8_t i = 0;
	/* 关联变量 */
	taFac_alarm[0].data.userData.value = &FP.AlarmStartTime_Temp;
	taFac_alarm[0].data.userData.store_enable = 1;
	taFac_alarm[1].data.userData.value = &FP.AlarmOutTime_Temp;
	taFac_alarm[1].data.userData.store_enable = 1;
	taFac_alarm[2].data.userData.value = &FP.AlarmStartTime_Flow;
	taFac_alarm[2].data.userData.store_enable = 1;
	taFac_alarm[3].data.userData.value = &FP.AlarmOutTime_Flow;
	taFac_alarm[3].data.userData.store_enable = 1;
	taFac_alarm[4].data.userData.value = &FP.LL_FlowFF;
	taFac_alarm[4].data.userData.store_enable = 1;
	taFac_alarm[5].data.userData.value = &FP.PressAlarm_LL;
	taFac_alarm[5].data.userData.store_enable = 1;
    /* 设置输入框属性 */
	for(i = 0; i < UI_ALARM_SUMQTY; i++)
	{
		taFac_alarm[i].data.min = 0;
		taFac_alarm[i].data.max = 999;
		taFac_alarm[i].type = "%d";
		taFac_alarm[i].width = lv_pct(25);
		taFac_alarm[i].height = lv_pct(10);
		taFac_alarm[i].pos_x = lv_pct(30 + (i%2) * 35);
		taFac_alarm[i].pos_y = lv_pct((i/2) * 23 + 20);
		taFac_alarm[i].max_length = 8;
		taFac_alarm[i].accepted_chars = "0123456789";
		taFac_alarm[i].one_line = true;
		taFac_alarm[i].cursor_click_pos = false;
	}
	taFac_alarm[4].accepted_chars = "0123456789.";
	taFac_alarm[4].type = "%.1f";
	taFac_alarm[4].pos_x = lv_pct(47);

	taFac_alarm[5].accepted_chars = "0123456789.";
	taFac_alarm[5].type = "%.1f";
	taFac_alarm[5].pos_x = lv_pct(47);
	taFac_alarm[5].pos_y = lv_pct(181);
}

/**
  * @brief  报警配置创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_alarm(void)
{
	lv_obj_t* label = NULL;  //显示标签

    tab_facAlarm_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_ALARM_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_alarm[i]);
    }

    /* 检测时间标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].Detect);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(35), 0);
    /* 确认时间标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].comf);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);

    /* 温度报警标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].Temp);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 温度检测时间单位标签 S */
    label = lv_label_create(cont);
    lv_label_set_text(label, "S");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(57), lv_pct(23));
    /* 温度确认时间单位标签 S */
    label = lv_label_create(cont);
    lv_label_set_text(label, "S");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(92), lv_pct(23));

    /* 流量压力报警标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].flow_Prs);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 流量压力检测时间单位标签 S */
    label = lv_label_create(cont);
    lv_label_set_text(label, "S");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(57), lv_pct(46));
    /* 流量压力确认时间单位标签 S */
    label = lv_label_create(cont);
    lv_label_set_text(label, "S");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(92), lv_pct(46));

    /* 流量报警下限 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].flowAlarmLL);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));

    /* 流量单位LPM */
    label = lv_label_create(cont);
    lv_label_set_text(label, "LPM");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(74), lv_pct(69));

	/* 工厂高温报警模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].highTemp);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(92));
    /* 工厂保护温度上限报警按钮 */
    tempHighAlarmBtn = lv_btn_create(cont);  //创建工厂保护温度上限报警按钮
    lv_obj_add_style(tempHighAlarmBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(tempHighAlarmBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(tempHighAlarmBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(tempHighAlarmBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂保护温度上限故障按钮 */
    tempHighFaultBtn = lv_btn_create(cont);  //创建工厂保护温度上限故障按钮
    lv_obj_add_style(tempHighFaultBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(tempHighFaultBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(tempHighFaultBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(tempHighFaultBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂保护温度上限报警按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].alarm);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, tempHighAlarmBtn, LV_ALIGN_CENTER, 0, 0);
    /* 工厂保护温度上限故障按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].fault);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, tempHighFaultBtn, LV_ALIGN_CENTER, 0, 0);

	/* 工厂低温报警模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowTemp);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(115));
    /* 工厂保护温度下限报警按钮 */
    tempLowAlarmBtn = lv_btn_create(cont);  //创建工厂保护温度下限报警按钮
    lv_obj_add_style(tempLowAlarmBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(tempLowAlarmBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(tempLowAlarmBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(tempLowAlarmBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂保护温度下限故障按钮 */
    tempLowFaultBtn = lv_btn_create(cont);  //创建工厂保护温度下限故障按钮
    lv_obj_add_style(tempLowFaultBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(tempLowFaultBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(tempLowFaultBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(tempLowFaultBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂保护温度下限报警按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].alarm);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, tempLowAlarmBtn, LV_ALIGN_CENTER, 0, 0);
    /* 工厂保护温度下限故障按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].fault);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, tempLowFaultBtn, LV_ALIGN_CENTER, 0, 0);

	/* 工厂低流量报警模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowFlow);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(138));
    /* 工厂低流量报警按钮 */
    flowAlarmBtn = lv_btn_create(cont);  //创建工厂低流量报警按钮
    lv_obj_add_style(flowAlarmBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(flowAlarmBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(flowAlarmBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(flowAlarmBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂低流量故障按钮 */
     flowFaultBtn = lv_btn_create(cont);  //创建工厂低流量故障按钮
     lv_obj_add_style(flowFaultBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
     lv_obj_set_style_bg_color(flowFaultBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
     lv_obj_align_to(flowFaultBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
     lv_obj_add_event_cb(flowFaultBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂低流量报警按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].alarm);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowAlarmBtn, LV_ALIGN_CENTER, 0, 0);
    /* 工厂低流量故障按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].fault);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, flowFaultBtn, LV_ALIGN_CENTER, 0, 0);

	/* 工厂低液位报警模式标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].lowLevel);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(161));
    /* 工厂低液位报警按钮 */
    levelAlarmBtn = lv_btn_create(cont);  //创建工厂低液位报警按钮
    lv_obj_add_style(levelAlarmBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(levelAlarmBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(levelAlarmBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(levelAlarmBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂低液位故障按钮 */
    levelFaultBtn = lv_btn_create(cont);  //创建工厂低液位故障按钮
    lv_obj_add_style(levelFaultBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(levelFaultBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(levelFaultBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(levelFaultBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 工厂低液位报警按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].alarm);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, levelAlarmBtn, LV_ALIGN_CENTER, 0, 0);
    /* 工厂低液位故障按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].fault);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, levelFaultBtn, LV_ALIGN_CENTER, 0, 0);
    /* 压力报警下限 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].pressAlarmLL);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(184));
    /* 压力报警下限单位kPa */
    label = lv_label_create(cont);
    lv_label_set_text(label, "kPa");
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(74), lv_pct(184));
    /* 清除历史报警按钮 */
    clearMessageBtn = lv_btn_create(cont);
    lv_obj_add_style(clearMessageBtn, &style_btn4, LV_STATE_DEFAULT);
    lv_obj_set_size(clearMessageBtn, 180, 65);
    lv_obj_align(clearMessageBtn, LV_ALIGN_TOP_LEFT, lv_pct(46), lv_pct(204));
    lv_obj_add_event_cb(clearMessageBtn, UI_factory_alarm_event_cb, LV_EVENT_CLICKED, NULL);
    lv_obj_add_style(clearMessageBtn, &style_btn3, LV_STATE_CHECKED);
    /* 按钮标签 */
    label = lv_label_create(clearMessageBtn);
    lv_label_set_text(label, dispText[DA.typeLanguage].clearHistory);  //文本内容
    lv_obj_align_to(label, clearMessageBtn, LV_ALIGN_CENTER, 0, 0);
	/* 更新按钮状态 */
    if(FP.Type_HL_TempFF == 0)
    {
        lv_obj_add_state(tempHighAlarmBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(tempHighFaultBtn, LV_STATE_CHECKED);
    }
    else if(FP.Type_HL_TempFF == 1)
    {
        lv_obj_add_state(tempHighFaultBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(tempHighAlarmBtn, LV_STATE_CHECKED);
    }
    if(FP.Type_LL_TempFF == 0)
    {
        lv_obj_add_state(tempLowAlarmBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(tempLowFaultBtn, LV_STATE_CHECKED);
    }
    else if(FP.Type_LL_TempFF == 1)
    {
        lv_obj_add_state(tempLowFaultBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(tempLowAlarmBtn, LV_STATE_CHECKED);
    }
    if(FP.Type_LL_Flow == 0)
    {
        lv_obj_add_state(flowAlarmBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowFaultBtn, LV_STATE_CHECKED);
    }
    else if(FP.Type_LL_Flow == 1)
    {
        lv_obj_add_state(flowFaultBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(flowAlarmBtn, LV_STATE_CHECKED);
    }
    if(FP.Type_LL_Level == 0)
    {
        lv_obj_add_state(levelAlarmBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(levelFaultBtn, LV_STATE_CHECKED);
    }
    else if(FP.Type_LL_Level == 1)
    {
        lv_obj_add_state(levelFaultBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(levelAlarmBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂参数声光配置按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_light_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_CLICKED)
	{
	    if (target == enLightBtn)  //声光使能按钮
		{
			FP.ES_LED = 1;
			lv_obj_add_state(enLightBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(disenLightBtn, LV_STATE_CHECKED);
			send_aux(&FP.ES_LED);
		}
	    else if(target == disenLightBtn)  //声光失能按钮
	    {
	    	FP.ES_LED = 0;
	        lv_obj_add_state(disenLightBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(enLightBtn, LV_STATE_CHECKED);
	        send_aux(&FP.ES_LED);
	    }
	    else if (target == enSoundBtn)  //扬声器使能按钮
		{
	    	DA.esBoardSound = 1;
			lv_obj_add_state(enSoundBtn, LV_STATE_CHECKED);
			lv_obj_clear_state(disenSoundBtn, LV_STATE_CHECKED);
			send_aux(&DA.esBoardSound);
		}
	    else if(target == disenSoundBtn)  //扬声器失能按钮
	    {
	    	DA.esBoardSound = 0;
	        lv_obj_add_state(disenSoundBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(enSoundBtn, LV_STATE_CHECKED);
	        send_aux(&DA.esBoardSound);
	    }
	}
	else if (target == slider)
    {
		UP.Brightness_LED = lv_slider_get_value(slider);
    	send_aux(&UP.Brightness_LED);
    }
}

/**
  * @brief	声光配置界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facLight_init(void)
{
	uint8_t i = 0;
	/* 关联变量 */
	taFac_light[0].data.userData.value = &FP.Num_LED;
	taFac_light[0].data.userData.store_enable = 1;
    /* 设置输入框属性 */
	for(i = 0; i < UI_LIGHT_SUMQTY; i++)
	{
		taFac_light[i].data.min = 1;
		taFac_light[i].data.max = 36;
		taFac_light[i].type = "%d";
		taFac_light[i].width = lv_pct(25);
		taFac_light[i].height = lv_pct(10);
		taFac_light[i].pos_x = lv_pct(65);
		taFac_light[i].pos_y = lv_pct((i/2) * 23 + 20);
		taFac_light[i].max_length = 8;
		taFac_light[i].accepted_chars = "0123456789-.";
		taFac_light[i].one_line = true;
		taFac_light[i].cursor_click_pos = false;
	}
}

/**
  * @brief  声光配置创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_light(void)
{
    lv_obj_t* label;  //显示标签

    tab_facLight_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_LIGHT_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_light[i]);
    }

	/* 声光使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].light);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);
    /* 声光失能按钮 */
    disenLightBtn = lv_btn_create(cont);  //创建声光失能按钮
    lv_obj_add_style(disenLightBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(disenLightBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(disenLightBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(disenLightBtn, UI_factory_light_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 声光使能按钮 */
    enLightBtn = lv_btn_create(cont);  //创建声光使能按钮
    lv_obj_add_style(enLightBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(enLightBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(enLightBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(enLightBtn, UI_factory_light_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 声光失能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, disenLightBtn, LV_ALIGN_CENTER, 0, 0);
    /* 声光使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].with);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, enLightBtn, LV_ALIGN_CENTER, 0, 0);


	/* 灯珠数量标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].ledSum);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));

	/* 扬声器使能标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].sound);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
    /* 扬声器失能按钮 */
    disenSoundBtn = lv_btn_create(cont);  //创建扬声器失能按钮
    lv_obj_add_style(disenSoundBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(disenSoundBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(disenSoundBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(disenSoundBtn, UI_factory_light_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 扬声器使能按钮*/
    enSoundBtn = lv_btn_create(cont);  //创建扬声器使能按钮
    lv_obj_add_style(enSoundBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(enSoundBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(enSoundBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(enSoundBtn, UI_factory_light_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 扬声器失能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].none);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, disenSoundBtn, LV_ALIGN_CENTER, 0, 0);
    /* 扬声器使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].with);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, enSoundBtn, LV_ALIGN_CENTER, 0, 0);

    slider = lv_slider_create(cont);                  /* 创建滑块 */
    lv_obj_set_size(slider, lv_pct(50), lv_pct(5));        /* 设置大小 */
    lv_obj_align(slider, LV_ALIGN_TOP_LEFT, lv_pct(45), lv_pct(73)); /* 设置位置 */
    lv_slider_set_value(slider, UP.Brightness_LED, LV_ANIM_OFF);          /* 设置当前值 */
//    lv_obj_set_style_bg_color(slider, lv_color_hex(COLOUR_WIIP_ORANGE), LV_PART_INDICATOR);
//    lv_obj_set_style_bg_color(slider, lv_color_hex(COLOUR_WIIP_ORANGE), LV_PART_KNOB);
    lv_obj_add_event_cb(slider, UI_factory_light_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

    label = lv_label_create(cont); /* 创建百分比标签 */
    lv_obj_set_style_text_color(label, lv_color_white(), LV_STATE_DEFAULT);  // 设置标签字体颜色
    lv_obj_set_width(label, lv_pct(30));
    lv_label_set_text(label, "灯带亮度："); /* 设置文本内容 */
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
	/* 更新按钮状态 */
    if(FP.ES_LED == 0)
    {
        lv_obj_add_state(disenLightBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(enLightBtn, LV_STATE_CHECKED);
    }
    else if(FP.ES_LED == 1)
    {
        lv_obj_add_state(enLightBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(disenLightBtn, LV_STATE_CHECKED);
    }
    if(DA.esBoardSound == 0)
    {
    	lv_obj_add_state(disenSoundBtn, LV_STATE_CHECKED);
    	lv_obj_clear_state(enSoundBtn, LV_STATE_CHECKED);
    }
    else if(DA.esBoardSound == 1)
    {
    	lv_obj_add_state(enSoundBtn, LV_STATE_CHECKED);
    	lv_obj_clear_state(disenSoundBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂参数设备信息按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_info_event_cb(lv_event_t* e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* target = lv_event_get_target(e);

	if (code == LV_EVENT_VALUE_CHANGED)
	{

	    if (target == refTypedropdown)  //冷媒种类下拉框
		{
			UP.gSlaver_Ref = lv_dropdown_get_selected(target);
			send_aux(&UP.gSlaver_Ref);
		}
		else if (target == commProtocoldropdown)  //通讯协议下拉框
		{
			FP.Com_Mode = lv_dropdown_get_selected(target);
			send_aux(&FP.Com_Mode);
		}

	}
	else if (code == LV_EVENT_CLICKED)
	{
		if(target == disenInfoBtn)  //厂家信息显示失能按钮
	    {
	    	DA.esInfo = 0;
	        lv_obj_add_state(disenInfoBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(enInfoBtn, LV_STATE_CHECKED);
	        send_aux(&DA.esInfo);
	    }
	    else if(target == enInfoBtn)  //厂家信息显示使能按钮
	    {
	    	DA.esInfo = 1;
	        lv_obj_add_state(enInfoBtn, LV_STATE_CHECKED);
	        lv_obj_clear_state(disenInfoBtn, LV_STATE_CHECKED);
	        send_aux(&DA.esInfo);
	    }
		else if(target == userSaveBtn)  //保存用户参数按钮
	    {
			UP.gSaveUP = 1;
	        send_aux(&UP.gSaveUP);
	    }
	    else if(target == facSaveBtn)  //保存工厂参数按钮
	    {
	    	UP.gSaveFP = 1;
	        send_aux(&UP.gSaveFP);
	        if (g_RW_State == RW_READY)
	        {
	        	g_RW_State = RW_WRITE_NAND_SCREEN;
	        }
	    }
	    else if(target == facRestoreBtn)  //恢复工厂参数按钮
	    {
	    	UP.gRestoryFP = 1;
	        send_aux(&UP.gRestoryFP);
	    }
	    else if(target == clearRunTimeBtn)  //归零设备时间
	    {
	    	FP.RunTime_Chiller = 0;
	    	send_aux(&FP.RunTime_Chiller);
	    }
	}
}

/**
  * @brief	设备信息界面输入框结构体初始化
  * @param  None
  * @retval None
  */
static void tab_facInfo_init(void)
{
	uint8_t i = 0;
	/* 关联变量 */
	taFac_info[0].data.userData.value = &DA.deviceModel[0];

    /* 设置输入框属性 */
	for(i = 0; i < UI_INFO_SUMQTY; i++)
	{
		taFac_info[i].data.min = 0;
		taFac_info[i].data.max = 999;
		taFac_info[i].type = "%s";
		taFac_info[i].width = lv_pct(60);
		taFac_info[i].height = lv_pct(10);
		taFac_info[i].pos_x = lv_pct(30);
		taFac_info[i].pos_y = lv_pct(-3);
		taFac_info[i].max_length = 50;
		taFac_info[i].accepted_chars = "0123456789qwertyuiopasdfghjklzxcvbnm+&/*=%!?#<>\\@$(){}[];'_-.,:\""
    		"QWERTYUIOPASDFGHJKLZXCVBNM";
		taFac_info[i].one_line = true;
		taFac_info[i].cursor_click_pos = false;
	}
}

/**
  * @brief  设备信息创建
  * @param  无
  * @retval 无
  */
void UI_create_factory_info(void)
{
	lv_obj_t* label = NULL;  //显示标签

    tab_facInfo_init();  //输入框初始化

    /* 创建输入框 */
    for(uint8_t i=0; i<UI_INFO_SUMQTY; i++)
    {
    	textarea_create_by(cont, &taFac_info[i]);
    }

	/* 厂家信息显示标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].device);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), 0);

	/* 厂家信息显示标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].manuInfo);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(23));
    /* 厂家信息显示失能按钮 */
    disenInfoBtn = lv_btn_create(cont);  //创建厂家信息显示失能按钮
    lv_obj_add_style(disenInfoBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(disenInfoBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(disenInfoBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(40), 0);  //位置
    lv_obj_add_event_cb(disenInfoBtn, UI_factory_info_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 厂家信息显示使能按钮 */
    enInfoBtn = lv_btn_create(cont);  //创建厂家信息显示使能按钮
    lv_obj_add_style(enInfoBtn, &style_btn4, LV_STATE_DEFAULT);  //样式
    lv_obj_set_style_bg_color(enInfoBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击颜色
    lv_obj_align_to(enInfoBtn, label, LV_ALIGN_TOP_LEFT, lv_pct(70), 0);  //位置
    lv_obj_add_event_cb(enInfoBtn, UI_factory_info_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 厂家信息显示失能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].no);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, disenInfoBtn, LV_ALIGN_CENTER, 0, 0);
    /* 厂家信息显示使能按钮标签 */
    label = lv_label_create(cont);
    lv_label_set_text(label, dispText[DA.typeLanguage].yes);
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align_to(label, enInfoBtn, LV_ALIGN_CENTER, 0, 0);

	/* 冷媒种类标签 */
	label = lv_label_create(cont);
	lv_label_set_text(label, dispText[DA.typeLanguage].refType);
	lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(46));
	/* 冷媒种类下拉框 */
	refTypedropdown = lv_dropdown_create(cont);
	lv_dropdown_set_options(refTypedropdown, "00-R134a\n01-R404a\n02-R410a\n03-R1234yf");
	lv_dropdown_set_selected(refTypedropdown, UP.gSlaver_Ref);
	lv_obj_set_width(refTypedropdown, lv_pct(50));
	lv_obj_align_to(refTypedropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
	lv_dropdown_set_selected_highlight(refTypedropdown, false);
	lv_obj_set_style_bg_color(refTypedropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
	lv_obj_set_style_bg_opa(refTypedropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
	lv_obj_add_event_cb(refTypedropdown, UI_factory_info_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

	/* 通讯协议标签 */
	label = lv_label_create(cont);
	 lv_label_set_text(label, dispText[DA.typeLanguage].commProtocol);
	 lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(1), lv_pct(69));
	/* 通讯协议下拉框 */
	commProtocoldropdown = lv_dropdown_create(cont);
	lv_dropdown_set_selected(commProtocoldropdown, FP.Com_Mode);
	lv_dropdown_set_options(commProtocoldropdown, "00-WIIP_RTU\n01-SMC_ASCII\n02-SMC_RTU");
	lv_obj_set_width(commProtocoldropdown, lv_pct(50));
	lv_obj_align_to(commProtocoldropdown, label, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
	lv_dropdown_set_selected_highlight(commProtocoldropdown, false);
	lv_obj_set_style_bg_color(commProtocoldropdown, lv_color_hex(0x292929), LV_PART_ITEMS | LV_STATE_CHECKED);
	lv_obj_set_style_bg_opa(commProtocoldropdown, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
	lv_obj_add_event_cb(commProtocoldropdown, UI_factory_info_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

    /* 保存用户参数按钮 */
	userSaveBtn = lv_btn_create(cont);  //创建保存用户参数按钮
    lv_obj_add_style(userSaveBtn, &style_btn6, 0);  //样式
    lv_obj_set_style_bg_color(userSaveBtn, lv_color_hex(0xf7aa84), LV_STATE_CHECKED);  //点击背景颜色
    lv_obj_align_to(userSaveBtn, cont, LV_ALIGN_TOP_LEFT, 0, lv_pct(115));  //位置
    lv_obj_add_event_cb(userSaveBtn, UI_factory_info_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 保存用户参数按钮标签 */
    label = lv_label_create(userSaveBtn);
    lv_label_set_text(label, dispText[DA.typeLanguage].saveUser);  //文本内容
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

    /* 保存工厂参数按钮 */
    facSaveBtn = lv_btn_create(cont);  //创建保存工厂参数按钮
    lv_obj_add_style(facSaveBtn, &style_btn6, 0);  //样式
    lv_obj_set_style_bg_color(facSaveBtn, lv_color_hex(0xf7aa84), LV_STATE_CHECKED);  //点击背景颜色
    lv_obj_align_to(facSaveBtn, cont, LV_ALIGN_TOP_LEFT, lv_pct(35), lv_pct(115));  //位置
    lv_obj_add_event_cb(facSaveBtn, UI_factory_info_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 保存工厂参数按钮标签 */
    label = lv_label_create(facSaveBtn);
    lv_label_set_text(label, dispText[DA.typeLanguage].saveFac);  //文本内容
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

    /* 恢复工厂参数按钮 */
    facRestoreBtn = lv_btn_create(cont);  //创建恢复工厂参数按钮
    lv_obj_add_style(facRestoreBtn, &style_btn6, 0);  //样式
    lv_obj_set_style_bg_color(facRestoreBtn, lv_color_hex(0xf7aa84), LV_STATE_CHECKED);  //点击背景颜色
    lv_obj_align_to(facRestoreBtn, cont, LV_ALIGN_TOP_LEFT, lv_pct(70), lv_pct(115));  //位置
    lv_obj_add_event_cb(facRestoreBtn, UI_factory_info_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 恢复工厂参数按钮标签 */
    label = lv_label_create(facRestoreBtn);
    lv_label_set_text(label, dispText[DA.typeLanguage].restFac);  //文本内容
    lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_STATE_DEFAULT);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
    /* 清除运行时间按钮 */

    clearRunTimeBtn = lv_btn_create(cont);
    lv_obj_add_style(clearRunTimeBtn, &style_btn4, LV_STATE_DEFAULT);
    lv_obj_set_size(clearRunTimeBtn, 180, 65);
    lv_obj_align(clearRunTimeBtn, LV_ALIGN_TOP_LEFT, lv_pct(35), lv_pct(92));
    lv_obj_add_event_cb(clearRunTimeBtn, UI_factory_info_event_cb, LV_EVENT_CLICKED, NULL);
    lv_obj_add_style(clearRunTimeBtn, &style_btn3, LV_STATE_CHECKED);
    /* 按钮标签 */
    label = lv_label_create(clearRunTimeBtn);
    lv_label_set_text(label, dispText[DA.typeLanguage].clearTime);  //文本内容
    lv_obj_align_to(label, clearRunTimeBtn, LV_ALIGN_CENTER, 0, 0);
	/* 更新按钮状态 */
    if(DA.esInfo == 0)
    {
        lv_obj_add_state(disenInfoBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(enInfoBtn, LV_STATE_CHECKED);
    }
    else if(DA.esInfo == 1)
    {
        lv_obj_add_state(enInfoBtn, LV_STATE_CHECKED);
        lv_obj_clear_state(disenInfoBtn, LV_STATE_CHECKED);
    }
}

/**
* @brief 工厂界面按钮回调
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_factory_btn_event_cb(lv_event_t* e)
{
    lv_event_code_t code = lv_event_get_code(e);  //触发事件
    lv_obj_t * obj = lv_event_get_target(e);  //触发事件对象
    lv_obj_t* parent = lv_obj_get_parent(obj);  //触发事件对象的父对象

    if(code == LV_EVENT_CLICKED)  //点击事件
    {
    	lv_obj_del(cont);
        cont = lv_obj_create(parentObj);
        lv_obj_set_size(cont, lv_pct(73), lv_pct(90));
    	lv_obj_add_style(cont, &style_cont1, 0);
    	lv_obj_set_scrollbar_mode(cont, LV_SCROLLBAR_MODE_OFF); // 设置滚动条模式为永不显示
        lv_obj_align(cont, LV_ALIGN_TOP_RIGHT, -8, 24);

        /* 查询按下的按钮 */
    	for (uint32_t i = 0; i < lv_obj_get_child_cnt(parent); i++)
		{
			lv_obj_t* child = lv_obj_get_child(parent, i);
			if (child == obj)
			{
				lv_obj_add_state(child, LV_STATE_CHECKED);
				if (child == tempBtn)
				{
					UI_create_factory_temp();  //温度相关创建
				    facDispNew = TEMP;
				}
				else if (child == refBtn)
				{
					UI_create_factory_ref();  //氟路相关创建
				    facDispNew = REF;
				}
				else if (child == eevBtn)
				{
					UI_create_factory_eev();  //电子膨胀阀创建
					facDispNew = EEV;
				}
				else if (child == refAlarmBtn)
				{
					UI_create_factory_refalarm();  //氟路报警创建
					facDispNew = REFALARM;
				}
				else if (child == flowBtn)
				{
					UI_create_factory_flow();  //流量相关创建
				    facDispNew = FLOW;
				}
				else if (child == pressBtn)
				{
					UI_create_factory_press();  //压力相关创建
				    facDispNew = PRESS;
				}
				else if (child == checkBtn)
				{
					UI_create_factory_check();  //检测配置创建
				    facDispNew = CHECK;
				}
				else if (child == portBtn)
				{
					UI_create_factory_port();  //端口配置创建
				    facDispNew = PORT;
				}
				else if (child == alarmBtn)
				{
					UI_create_factory_alarm();  //报警配置创建
				    facDispNew = ALARM;
				}
				else if (child == lightBtn)
				{
					UI_create_factory_light();  //声光配置创建
				    facDispNew = LIGHT;
				}
				else if (child == infoBtn)
				{
					UI_create_factory_info();  //设备信息创建
				    facDispNew = INFO;
				}

				UI_display_factory();  //刷新当前界面
			}
			else
			{
				lv_obj_clear_state(child, LV_STATE_CHECKED);
			}
		}
    }

}

/**
  * @brief	定时刷新数据回调函数
  * @param  None
  * @retval None
  */
static void refresh_data_cb(lv_timer_t* timer)
{
	LV_UNUSED(timer);
	/* 遍历所有的文本框，对文本框的内容进行更新 */
	for(uint8_t i = 0; i < lv_obj_get_child_cnt(cont); i++)
	{
		lv_obj_t* child = lv_obj_get_child(cont, i);
		if(lv_obj_check_type(child, &lv_textarea_class))
		{
			char str[50] = {0};
			ta_userData_t userData = *(ta_userData_t *)lv_obj_get_user_data(child);
			if(type_is_float(userData.type) == 1)  //浮点数
			{
				sprintf(str, userData.type, *(float*)userData.data.userData.value);
			}
			else if(type_is_float(userData.type) == 2)  //字符串
			{
				strcpy(&str[0], (char*)userData.data.userData.value);
			}
			else  //整数
			{
				sprintf(str, userData.type, *(uint16_t*)userData.data.userData.value);
			}
			lv_textarea_set_text(child, str);
		}
	}

	UI_display_factory();  //刷新按钮和标签
}

/**
* @brief 工厂参数界面创建
* @param *e ：事件相关参数的集合，它包含了该事件的所有数据
* @return 无
*/
void UI_create_factory(void)
{
	static lv_style_t tab_btn_style;	  // 侧边栏按钮样式
	parentObj_img = lv_img_create(lv_scr_act());
    lv_img_set_src(parentObj_img, &dsc_img_buff[2]);
    lv_obj_add_style(parentObj_img, &style_parentObj, LV_STATE_DEFAULT);  //添加父对象为无填充样式
    lv_obj_set_size(parentObj_img, lv_pct(100), lv_pct(100));  //设置父对象的大小
    lv_obj_align(parentObj_img, LV_ALIGN_BOTTOM_MID, 0, 0);  //设置父对象的位置

    parentObj = lv_obj_create(lv_scr_act());  //创建父对象
    lv_obj_add_style(parentObj, &style_parentObj, LV_STATE_DEFAULT);
    lv_obj_set_size(parentObj, lv_pct(100), lv_pct(88));  //设置父对象的大小
    lv_obj_set_style_bg_color(parentObj, lv_palette_main(LV_PALETTE_GREEN), LV_STATE_DEFAULT);
    lv_obj_align(parentObj, LV_ALIGN_BOTTOM_MID, 0, 0);  //设置父对象的位置

	/* 设置侧边栏按钮风格 */
	lv_style_init(&tab_btn_style);
	lv_style_set_bg_color(&tab_btn_style, lv_color_hex(0xbebdc0));
	lv_style_set_border_color(&tab_btn_style, lv_color_hex(0xbebdc0));
	lv_style_set_border_width(&tab_btn_style, 0);
    /* 定时器 */
    UI_display_timer = lv_timer_create(refresh_data_cb, 100, NULL);  //100mS触发一次

    /* 列表 */
    list = lv_obj_create(parentObj);
    lv_obj_set_size(list, lv_pct(27), lv_pct(90));
	lv_obj_add_style(list, &style_list1, 0);
	lv_obj_set_scrollbar_mode(list, LV_SCROLLBAR_MODE_OFF); // 设置滚动条模式为永不显示
    lv_obj_align(list, LV_ALIGN_TOP_LEFT, 0, 24);
    /* 容器 */
    cont = lv_obj_create(parentObj);
    lv_obj_set_size(cont, lv_pct(73), lv_pct(90));
	lv_obj_add_style(cont, &style_cont1, 0);
	lv_obj_set_scrollbar_mode(cont, LV_SCROLLBAR_MODE_OFF); // 设置滚动条模式为永不显示
    lv_obj_align(cont, LV_ALIGN_TOP_RIGHT, -8, 24);
    /* 温度相关按钮 */
    tempBtn = lv_btn_create(list);  //创建温度相关按钮
//    lv_obj_add_style(tempBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(tempBtn, 202, 89);
    lv_obj_set_style_bg_color(tempBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //背景颜色
	lv_obj_set_style_bg_img_src(tempBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(tempBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_add_event_cb(tempBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    lv_obj_add_state(tempBtn, LV_STATE_CHECKED);  //状态
    /* 温度相关按钮标签 */
    templabel = lv_label_create(tempBtn);
    lv_label_set_text(templabel, dispText[DA.typeLanguage].TEmp);  //文本内容
    lv_obj_set_style_text_color(templabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(templabel, LV_ALIGN_CENTER, 0, 0);
    /* 氟路设置按钮 */
    refBtn = lv_btn_create(list);  //创建氟路相关按钮
    lv_obj_add_style(refBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(refBtn, 202, 89);
    lv_obj_set_style_bg_color(refBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(refBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(refBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(refBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(refBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(28));  //位置
    lv_obj_add_event_cb(refBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 氟路设置按钮标签 */
    reflabel = lv_label_create(refBtn);
     lv_label_set_text(reflabel, dispText[DA.typeLanguage].Ref);  //文本内容
    lv_obj_set_style_text_color(reflabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(reflabel, LV_ALIGN_CENTER, 0, 0);
    /* 电子膨胀阀按钮 */
    eevBtn = lv_btn_create(list);  //创建电子膨胀阀按钮
    lv_obj_add_style(eevBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(eevBtn, 202, 89);
    lv_obj_set_style_bg_color(eevBtn, lv_color_hex(0xbebdc0), LV_STATE_DEFAULT);  //点击背景颜色
    lv_obj_set_style_bg_color(eevBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(eevBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(eevBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(eevBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(56));  //位置
    lv_obj_add_event_cb(eevBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 电子膨胀阀按钮标签 */
    eevlabel = lv_label_create(eevBtn);
     lv_label_set_text(eevlabel, dispText[DA.typeLanguage].eev);  //文本内容
    lv_obj_set_style_text_color(eevlabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(eevlabel, LV_ALIGN_CENTER, 0, 0);
    /* 氟路报警按钮 */
    refAlarmBtn = lv_btn_create(list);  //创建氟路报警按钮
    lv_obj_add_style(refAlarmBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(refAlarmBtn, 202, 89);
    lv_obj_set_style_bg_color(refAlarmBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(refAlarmBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(refAlarmBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(refAlarmBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(refAlarmBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(84));  //位置
    lv_obj_add_event_cb(refAlarmBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 氟路报警氟路设置按钮标签 */
    refAlarmlabel = lv_label_create(refAlarmBtn);
     lv_label_set_text(refAlarmlabel, dispText[DA.typeLanguage].refAlarm);  //文本内容
    lv_obj_set_style_text_color(refAlarmlabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(refAlarmlabel, LV_ALIGN_CENTER, 0, 0);
    /* 流量相关按钮 */
    flowBtn = lv_btn_create(list);  //创建流量相关按钮
    lv_obj_add_style(flowBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(flowBtn, 202, 89);
    lv_obj_set_style_bg_color(flowBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(flowBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(flowBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(flowBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(flowBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(112));  //位置
    lv_obj_add_event_cb(flowBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 流量相关按钮标签 */
    flowlabel = lv_label_create(flowBtn);
     lv_label_set_text(flowlabel, dispText[DA.typeLanguage].FLow);  //文本内容
    lv_obj_set_style_text_color(flowlabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(flowlabel, LV_ALIGN_CENTER, 0, 0);
    /* 压力相关按钮 */
    pressBtn = lv_btn_create(list);  //创建压力相关按钮
    lv_obj_add_style(pressBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(pressBtn, 202, 89);
    lv_obj_set_style_bg_color(pressBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(pressBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(pressBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(pressBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(pressBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(140));  //位置
    lv_obj_add_event_cb(pressBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 压力相关按钮标签 */
    presslabel = lv_label_create(pressBtn);
     lv_label_set_text(presslabel, dispText[DA.typeLanguage].Press);  //文本内容
    lv_obj_set_style_text_color(presslabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(presslabel, LV_ALIGN_CENTER, 0, 0);
    /* 检测配置按钮 */
    checkBtn = lv_btn_create(list);  //创建检测配置按钮
    lv_obj_add_style(checkBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(checkBtn, 202, 89);
    lv_obj_set_style_bg_color(checkBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(checkBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(checkBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(checkBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(checkBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(168));  //位置
    lv_obj_add_event_cb(checkBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 检测配置按钮标签 */
    checklabel = lv_label_create(checkBtn);
     lv_label_set_text(checklabel, dispText[DA.typeLanguage].check);  //文本内容
    lv_obj_set_style_text_color(checklabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(checklabel, LV_ALIGN_CENTER, 0, 0);
    /* 端口配置按钮 */
    portBtn = lv_btn_create(list);  //端口配置相关按钮
    lv_obj_add_style(portBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(portBtn, 202, 89);
    lv_obj_set_style_bg_color(portBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(portBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(portBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(portBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(portBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(196));  //位置
    lv_obj_add_event_cb(portBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 端口配置按钮标签 */
    portlabel = lv_label_create(portBtn);
     lv_label_set_text(portlabel, dispText[DA.typeLanguage].por);  //文本内容
    lv_obj_set_style_text_color(portlabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(portlabel, LV_ALIGN_CENTER, 0, 0);
    /* 报警配置按钮 */
    alarmBtn = lv_btn_create(list);  //创建报警配置按钮
    lv_obj_add_style(alarmBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(alarmBtn, 202, 89);
    lv_obj_set_style_bg_color(alarmBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(alarmBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(alarmBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(alarmBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(alarmBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(224));  //位置
    lv_obj_add_event_cb(alarmBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 报警配置按钮标签 */
    alarmlabel = lv_label_create(alarmBtn);
     lv_label_set_text(alarmlabel, dispText[DA.typeLanguage].Alarm);  //文本内容
    lv_obj_set_style_text_color(alarmlabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(alarmlabel, LV_ALIGN_CENTER, 0, 0);
    /* 声光配置按钮 */
    lightBtn = lv_btn_create(list);  //创建声光配置按钮
    lv_obj_add_style(lightBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(lightBtn, 202, 89);
    lv_obj_set_style_bg_color(lightBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(lightBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(lightBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(lightBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(lightBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(252));  //位置
    lv_obj_add_event_cb(lightBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 声光配置按钮标签 */
    lightlabel = lv_label_create(lightBtn);
     lv_label_set_text(lightlabel, dispText[DA.typeLanguage].Light);  //文本内容
    lv_obj_set_style_text_color(lightlabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(lightlabel, LV_ALIGN_CENTER, 0, 0);
    /* 设备信息按钮 */
    infoBtn = lv_btn_create(list);  //创建设备信息按钮
    lv_obj_add_style(infoBtn, &tab_btn_style, 0);  //样式
    lv_obj_set_size(infoBtn, 202, 89);
    lv_obj_set_style_bg_color(infoBtn, lv_color_hex(0x9c9c9c), LV_STATE_DEFAULT);  //点击背景颜色
//    lv_obj_set_style_bg_color(infoBtn, lv_color_hex(0x3a96f1), LV_STATE_CHECKED);  //点击背景颜色
	lv_obj_set_style_bg_img_src(infoBtn, &dsc_ico_buff[3], LV_STATE_DEFAULT);
	lv_obj_set_style_bg_img_src(infoBtn, &dsc_ico_buff[2], LV_STATE_CHECKED);
    lv_obj_align_to(infoBtn, list, LV_ALIGN_TOP_LEFT, 0, lv_pct(280));  //位置
    lv_obj_add_event_cb(infoBtn, UI_factory_btn_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 设备信息按钮标签 */
    infolabel = lv_label_create(infoBtn);
     lv_label_set_text(infolabel, dispText[DA.typeLanguage].info);  //文本内容
    lv_obj_set_style_text_color(infolabel, lv_color_hex(0x000000), LV_STATE_DEFAULT);
    lv_obj_align(infolabel, LV_ALIGN_CENTER, 0, 0);

    UI_create_factory_temp();  //温度相关
    facDispNew = TEMP;
}

/**
  * @brief  工厂参数界面删除
  * @param  无
  * @retval 无
  */
void UI_delete_factory(void)
{
    lv_obj_del(parentObj);  //删除当前界面
    lv_obj_del(parentObj_img);  //删除当前界面
    lv_timer_del(UI_display_timer);  //删除定时器
}

/**
  * @brief  工厂参数界面显示
  * @param  无
  * @retval 无
  */
void UI_display_factory(void)
{
	switch(facDispNew)
	{
	case TEMP:
		break;
	case REF:
		break;
	case EEV:
		/* 更新按钮状态 */
        if (UP.gEnableDataEEV1 == 0)
        {
        	lv_obj_add_state(refRunBtn, LV_STATE_CHECKED);
        }
        else
        {
        	lv_obj_clear_state(refRunBtn, LV_STATE_CHECKED);
        }
        if (UP.gEnableDataEEV2 == 0)
        {
        	lv_obj_add_state(bypRunBtn, LV_STATE_CHECKED);
        }
        else
        {
        	lv_obj_clear_state(bypRunBtn, LV_STATE_CHECKED);
        }
        if (UP.regAddr100.Para.Run_State == 0)
        {
        	lv_obj_clear_state(runBtn, LV_STATE_CHECKED);
            lv_label_set_text(runLabel, dispText[DA.typeLanguage].run);
        }
        else
        {
        	lv_obj_add_state(runBtn, LV_STATE_CHECKED);
            lv_label_set_text(runLabel, dispText[DA.typeLanguage].stop);
        }
        /* 更新标签状态 */
        if (FP.ES_Pc == 1)
        {
        	lv_obj_clear_flag(highPressLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
        	lv_obj_clear_flag(hpSatTempLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
        }
        else
        {
        	lv_obj_add_flag(highPressLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
        	lv_obj_add_flag(hpSatTempLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
        }
        if (FP.ES_Tc == 1)
        {
        	lv_obj_clear_flag(condTempLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
        }
        else
        {
        	lv_obj_add_flag(condTempLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
        }
        if (FP.ES_Pc == 1 && FP.ES_Tc == 1)
        {
        	lv_obj_clear_flag(supercolcTempLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
        }
        else
        {
        	lv_obj_add_flag(supercolcTempLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
        }
        if (FP.ES_Te == 1)
        {
        	lv_obj_clear_flag(evaTempLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
        }
        else
        {
        	lv_obj_add_flag(evaTempLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
        }
        if (FP.ES_To == 1)
        {
        	lv_obj_clear_flag(outletTempLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
        }
        else
        {
        	lv_obj_add_flag(outletTempLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
        }
//        if (FP.ES_Te == 1)
//        {
//        	lv_obj_clear_flag(evaTempLabel, LV_OBJ_FLAG_HIDDEN);  // 显示标签
//        }
//        else
//        {
//        	lv_obj_add_flag(evaTempLabel, LV_OBJ_FLAG_HIDDEN);    // 隐藏标签
//        }

        lv_label_set_text_fmt(pvRefLabel, "%.1f", (float)UP.gUpDownData1EEV1/10);
        lv_label_set_text_fmt(pvBypLabel, "%.1f", (float)UP.gUpDownData1EEV2/10);
        lv_label_set_text_fmt(highPressLabel, "%.1f", UP.gSlaver_Press2);
        lv_label_set_text_fmt(hpSatTempLabel, "%.1f", UP.gSlaver_Press_Temp2);
        lv_label_set_text_fmt(condTempLabel, "%.1f", UP.gSlaver_Temp2);
        lv_label_set_text_fmt(supercolcTempLabel, "%.1f", UP.gSlaver_Superhest_Press1);
        lv_label_set_text_fmt(lowPressLabel, "%.1f", UP.gSlaver_Press1);
        lv_label_set_text_fmt(lpSatTempLabel, "%.1f", UP.gSlaver_Press_Temp1);
        lv_label_set_text_fmt(evaTempLabel, "%.1f", UP.gSlaver_Temp1);
        lv_label_set_text_fmt(superheatTempLabel, "%.1f",UP.gSlaver_Supercold_Press2 );
        lv_label_set_text_fmt(outletTempLabel, "%.1f", UP.gSlaver_Temp3);
        lv_label_set_text_fmt(pvAuxLabel, "%.1f", (float)UP.gUpDownData1EEV3/10);
		break;
	case REFALARM:
		break;
	case FLOW:
		/* 更新标签状态 */
	    lv_label_set_text_fmt(pumpFreLabel, "%d", UP.gSV_Comp);  //更新变频器目标值
		break;
	case PRESS:
		break;
	case CHECK:
		break;
	case PORT:


		break;
	case ALARM:
		break;
	case LIGHT:
		break;
	case INFO:
		break;
	}
}
